Edit the search bar design

Edit the search bar design

tux57tux57 Posts: 20Questions: 5Answers: 0

Hello,

$('#Tab_filter').replaceWith("<div id='Tab_filter' class='dataTables_filter'><label>Search:<input class='' placeholder='Search' aria-controls='Tab' type='search'></label></div>");

I want to edit the search bar design with the following command but it does not work. The change of appearance is ok but the search does not work anymore .

A idea ?

Thank you

Answers

  • allanallan Posts: 61,934Questions: 1Answers: 10,155 Site admin

    If you replace the input element with your own input element, then yes, it won't automatically search the table since your new element doesn't have any events bound to it.

    You'd need to bind a function which calls search() on input to it.

    Allan

This discussion has been closed.