Call fnFilter on a specific table (page with multiple tables)
Call fnFilter on a specific table (page with multiple tables)
smg6511
Posts: 12Questions: 2Answers: 0
I've initiated a multi-table page with a typical call:
[code]
var oTables = $(".display").dataTable({...various config settings...});
[/code]
I've added a button to clear the filter field. On a page with only one table, I can clear this easily using:
[code]
oTables.fnFilter("");
[/code]
How can I apply that function to a specific table by index?
[code]
var oTables = $(".display").dataTable({...various config settings...});
[/code]
I've added a button to clear the filter field. On a page with only one table, I can clear this easily using:
[code]
oTables.fnFilter("");
[/code]
How can I apply that function to a specific table by index?
This discussion has been closed.
Replies
In DataTables 1.10 you can use the `tables()` method to specific a specific table from a multi-table instance: http://next.datatables.net/reference/api/table()
Allan
[code]
$("table.display:eq("+idx+")").dataTable().fnFilter("");
[/code]
Allan