javascript - jQuery DataTable : Individual column searching on table header -
i have followed steps on individual column searching (text inputs) , individual column searching (select inputs) use multiple filters on jquery datatable , there multiple filters on footer. on other hand, want move these filters header of datatable, cannot align them horizontally displayed on image below. there examples custom filtering - range search, not aligned well. possible this?
$(document).ready(function() { // setup - add text input each footer cell $('#example tfoot th').each( function () { var title = $(this).text(); $(this).html( '<input type="text" placeholder="search '+title+'" />' ); } ); // datatable var table = $('#example').datatable(); // apply search table.columns().every( function () { var = this; $( 'input', this.footer() ).on( 'keyup change', function () { if ( that.search() !== this.value ) { .search( this.value ) .draw(); } } ); } ); } );
here solution
problem please add necessary things datatable configuration.
https://jsfiddle.net/dipakthoke07/ehhfsrfq/2/
hope you.
Comments
Post a Comment