How to place the Individual column searching (text inputs) on thead
How to place the Individual column searching (text inputs) on thead
StefanLam
Posts: 1Questions: 1Answers: 0
When I change the text input searching to thead, the searching function was not working
How to place on thead with searching function?
// DataTable
var table = $('#arptable').DataTable({
"order": [],
"lengthMenu": [ 25, 50, 100, 200 ],
"dom": "<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'f><'col-sm-12 col-md-6'i><'col-sm-12 col-md-6'p>>rt<'row'<'col-sm-12 col-md-6'l><'col-sm-12 col-md-6'p>>",
initComplete: function () {
// Apply the search
this.api().columns().every( function () {
var that = this;
$( 'input', this.footer() ).on( 'keyup change clear', function () {
if ( that.search() !== this.value ) {
that
.search( this.value )
.draw();
}
} );
} );
}
});
This discussion has been closed.
Answers
See if this thread asking the same question helps.
Kevin