0
你好,我在我的项目中的JavaScript文件之间的冲突有问题明确问题如下冲突文件
在我的管理面板中的所有用户都显示在一个自举表在那里我可以对它进行排序。还有一个分页系统。看起来不错。
我想要一个系统=>将整行作为一个按钮,并在点击行后它应该显示一个折叠隐藏信息“在每行的下方”,我将放置用户信息。
我使用SB管理V2 link 和 此代码将添加到表文件
$(document).ready(function() {
/*
* Initialse DataTables, with no sorting on the 'details' column
*/
var oTable = $('#example').dataTable({
"aoColumnDefs" : [{
"bSortable" : false,
"aTargets" : [0]
}],
"aaSorting" : [[1, 'asc']]
});
$('#example tbody td ').live('click', function() {
var nTr = $(this).parents('tr')[0];
if (oTable.fnIsOpen(nTr)) {
/* This row is already open - close it */
this.src = "../examples_support/details_open.png";
oTable.fnClose(nTr);
} else {
/* Open this row */
this.src = "../examples_support/details_close.png";
oTable.fnOpen(nTr, fnFormatDetails(oTable, nTr), 'details');
}
});
});
那么,究竟是什么问题?当你做什么时,你会看到什么?调试控制台中是否有错误? – jfriend00
当我添加此代码表从表正确工作的第一页,但其他不工作 –
您在控制台中得到任何错误。 – ahalya