📅  最后修改于: 2022-03-11 15:03:31.747000             🧑  作者: Mango
Plain text123456789101112131415$('#tbl_leader_board tbody').on('click', 'td.details-control', function () { var tr = $(this).closest('tr'); var row = table.row( tr ); if ( row.child.isShown() ) { // This row is already open - close it row.child.hide(); tr.removeClass('shown'); } else { // Open this row $( row.child() ).DataTable(); tr.addClass('shown'); } } );