Target column filter inputs only
Target column filter inputs only

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
I use the following to clear input elements in column filter of header but this targets all input fields on the page and clears them all.
Is there a way to just target those elements in header column?
function clearTable(){
myTable.clear().search('').draw();
myTable.columns().search('').draw();
$('.filter th').each(function (i) {
$("input[type='text']").each(function (){
$(this).val('');
})
});
}
This question has an accepted answers - jump to answer
Answers
should be:
That will limit the search to your found
th
elements. Otherwise it is just operating globally (multiple times).Allan
Thank you Allan,