How to add searchpane in specific div?
How to add searchpane in specific div?
fahadkhan
Posts: 7Questions: 3Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Hi,
How do I add search pane in a specific div.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
See if this example helps.
Kevin
Hi Kevin,
Thanks for your reply , the link you shared
$(document).ready(function() {
let table = $('#example').DataTable();
new $.fn.dataTable.SearchPanes(table, {});
table.searchPanes.container().prependTo(table.table().container());
});
I am new to this datatable , to be honest I didnt get the example, what I am trying to do is , I have div named search-pane , and I wan search pane to appear in this div tag. i am not sure how to do it.
Please help.
The
searchPanes.container()
API returns the container for the searchPanes. Use the jQuery prependTo() method, or whatever method meets your needs, to place the SearchPanes element. Try replacingtable.table().container())
with"#search-pane"
, assumingdiv named search-pane
means you have `id="search-pane".Kevin
Thanks a lot