ID for moved search box
ID for moved search box
Hi,
the solution to my question is probably very simple.
I moved my search box using:
initComplete : function() {
$("#example_filter").detach().appendTo('#new-search-area');
}
but now my search box has no ID:
<input type="search" class="" placeholder="" aria-controls="example">
Is there a way to add the ID?
Web:
http://st3p.com/telefonny_zoznam/teldt.html
Thanks,
Emil
This discussion has been closed.
Replies
I don't believe the search box DataTables adds ever has an id. It certainly wouldn't be stripped just because you moved it. What makes you think it had an id in the first place?
Allan
It probably never had one. Is there a way to assign it an ID value? It would help me a lot with further programming.
$("#example_filter input").prop( 'id', ... )
would do it.Allan
Thank you Allan!
assigns id="search_box" and then moves it to the new div.