when i type any words , filtering not working, Please help for my thesis.
when i type any words , filtering not working, Please help for my thesis.
dnepomuceno101
Posts: 31Questions: 4Answers: 0
when i type any words , filtering not working,
Please help for my thesis.
$(document).ready(function() {
$('a[data-toggle="tab"]').on( 'shown.bs.tab', function (e) {
$.fn.dataTable.tables( {visible: true, api: true} ).columns.adjust();
} );
var table1 = $('table.tableresponsive').DataTable( {
responsive:true,
language: {
searchPlaceholder: "Type here . . ." }
} );
$('#DSE tfoot th').each( function () {
var title = $(this).text();
$(this).html( '<input type="text" placeholder="Filter '+title+'" />' );
} );
var table = $('#DSE').table1({
orderCellsTop: true,
fixedHeader: true,
initComplete: function () {
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();
}
});
});
},
});
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This question has an accepted answers - jump to answer
Answers
can you highlight my mistakes kind sir?
This doesn't look right. What is
table1
? I think you should havevar table = $('#DSE').DataTable({
instead. I suspect you are getting an error in the browser's console abouttable1
.If this doesn't help please provide a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10
Kevin
ok sir, but how can i call Datatable for different tables?
its ok now sir thank you