How can I search in two tables so that for 1st table I want datatables default search functionality
How can I search in two tables so that for 1st table I want datatables default search functionality
karanl
Posts: 6Questions: 3Answers: 0
How can I search in two tables so that for 1st table I want datatables default search functionality and for second I want my custom search?
In my project when I implemented custom search,even when I enter some text in 1st table's search field it was searching in second table.I think this is because of '.dataTables_filter input' class which is same for both search fields of both tables.
Thank you.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
'''$('.dataTables_filter input')
.off()
.on('keyup', function() {
filterByDetailsSearch(this.value);
}); '''
I also answered your question in this thread.
You can use a selector like this for a specific table:
$('#myTable_filter input')
.Kevin