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