styling search DOM

styling search DOM

jerome99jerome99 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

Answers

This discussion has been closed.