styling search DOM
styling search DOM
jerome99
Posts: 2Questions: 1Answers: 0
Hello,
I am trying to customize the dataTables_filter by replacing the "Search:" label with an icon.
I am using the following js to update the HTML but somehow, the search event is not raised anymore.
var $label = $( '.dataTables_filter label').html().replace(
"Search:",
'<i class="material-icons">search</i>'
);
$( '.dataTables_filter label' ).replaceWith( $label );
Any idea why this would break the filter ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The conventional way to do this would be with the "language" option:
https://datatables.net/reference/option/language.search
Is that not working for you?
Hey Perfect fit ! I just did not find this help page...
Thanks a lot !