简体   繁体   中英

Individual column filter not working in Datatable

I am using jQuery DataTables @version 1.10.11

All thing is work but column Filter not working . what is the issue?

is there external plug-in required or file?

Please help.

 $(document).ready(function(){ $('#clist').dataTable({ "ordering": true, "searching": false, "order": [[ 0, "asc" ]], "dom": 'rt<"bottom"lip>', "columnDefs": [ { "targets": [ 0 ], "visible": false, }, { "targets": [ 2 ], "orderable": false, }, { "targets": [ 3 ], "orderable": false, }, { "targets": [ 4 ], "orderable": false, } ] }) .columnFilter({ //sPlaceHolder: "head:after", aoColumns: [ { type: "text" }, { type: "select", values: [ 'val1', 'val2', 'val3', 'val4'] }, { type: "select", values: [ 'val1', 'val2', 'val3', 'val4'] }, null ] }); }); 
 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="//cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js"></script> 

You need to include jquery.dataTables.columnFilter.js for columnFilter plugin, see Downloads page.

See this jsFiddle for code and demonstration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM