我正在尝试使用 DataTables 的输入插件进行分页。我已经加载了所有三个 jar 文件 - jQuery1.11.1、dataTables1.10 和 input.js。但我仍然得到
TypeError: $.fn.dataTableExt is undefined
和
TypeError: plugin is undefined
错误。
我必须包括任何其他罐子吗?在一些旧帖子中,我看到 plugin.jar 正在加载,但在DataTables 插件页面本身中没有提到这个 JAR。
数据表初始化代码
var table = $jq11('#openCasesTable').dataTable({
"ajax": someUrl,
"aoColumnDefs": [
{ "bSortable": false, "aTargets": [0, 6, 7] }
],
"columns": [
{
"data": null,
"render": function(data, type, row, meta) {
...
}
},
...
],
"deferRender": true,
"dom": 'l<"#removeButtonDiv.removeButton">rtip',
"filter": false,
"initComplete": function(settings, json) {
$('#removeButtonDiv').html('<input id="removeButton" type="button" value="Remove" style="float:right; height: 25px;" disabled />');
},
"lengthMenu": [ [20, 40, 60, 80, 100], [20, 40, 60, 80, 100] ],
"language": {
"emptyTable": "No data to list",
"infoFiltered": " "
},
"order": [[4, "desc"]],
"processing": true,
"drawCallback": function( settings ) {
$.each(selected, function(index, value){
$('#'+value).attr("checked", "checked");
});
},
"serverSide": true,
"sPaginationType": "input"
});