我在jquery数据表中包含了一个列过滤器,但它没有加载。我将在下面发布我的代码。
CODE:
var oTable = $('#big_table').dataTable({
"aoColumnDefs": [{
"sWidth": "20%",
"aTargets": [6]
}],
"bProcessing": true,
"aaSorting": [
[0, 'desc']
],
"bServerSide": true,
"sAjaxSource": '<?php echo base_url(); ?>agent/order/list_order',
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayStart ": 25,
"oLanguage": {
"sProcessing": "<img src='<?php echo base_url(); ?>img/ajax-loader.gif'>"
},
"fnInitComplete": function() {
//oTable.fnAdjustColumnSizing();
},
"fnRowCallback": function(nRow, aData, iDisplayIndex) {
nRow.className = aData[5];
},
'fnServerData': function(sSource, aoData, fnCallback) {
$.ajax({
'dataType': 'json',
'type': 'POST',
'url': sSource,
'data': aoData,
'success': fnCallback
});
}
})
dataTable.columnFilter({
sPlaceHolder: "head:before",
aoColumns: [null, {
type: "select",
values: ['-01-', '-02-', '-03-', '-04-', '-05-', '-06-', '-07-', '-08-', '-09-', '-10-', '-11-', '-12-']
},
null,
null,
null,
null,
null,
]
});
这是js代码,我也会从我的头文件中发布包含。 的
<script src="<?php echo site_url('js/datatables/jquery.dataTables.js'); ?>"></script>
<script src="<?php echo site_url('js/datatables/jquery.dataTables.columnFilter.js'); ?>"></script>