.fnDestroy(),columnFilter();两者都可以工作。有没有办法做到这一点。目前只有.fnDestroy正在工作。
描述DataTable问题的代码:
$(document).ready(function () {
var exampleResponsiveHelper = undefined;
var nomineeTableResponsiveHelper = undefined;
var coverageTableResponsiveHelper = undefined;
var agentInfoTableResponsiveHelper = undefined;
var payoutTableResponsiveHelper = undefined;
var payoutTable1ResponsiveHelper = undefined;
var payoutTable2ResponsiveHelper = undefined;
var payoutTable3ResponsiveHelper = undefined;
var payoutTable4ResponsiveHelper = undefined;
var payoutTable5ResponsiveHelper = undefined;
var breakpointDefinition = {
tablet: 1024,
phone : 480
};
///////////////////////////////////////////////////
var tableElement = $('#example');
tableElement.dataTable({
autoWidth : false,
preDrawCallback: function () {
// Initialize the responsive datatables helper once.
if (!exampleResponsiveHelper) {
exampleResponsiveHelper = new ResponsiveDatatablesHelper(tableElement, breakpointDefinition);
}
},
rowCallback : function (nRow) {
exampleResponsiveHelper.createExpandIcon(nRow);
},
drawCallback : function (oSettings) {
exampleResponsiveHelper.respond();
}
}).fnDestroy(),columnFilter();
}
最佳答案
要链接命令,请使用.fnDestroy().columnFilter();
您在代码中使用了逗号。
关于javascript - .fnDestroy(),columnFilter();两者都可以工作。有没有办法做到这一点。目前只有.fnDestroy正在运作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47672069/