jQuery plugin DataTables: How to highlight the current search text?

I would have to suggest the highlight plugin 🙂

I’m using this in about the same scenario right now, it’s given me no issues thus far.

The usage is pretty simple:

$("#myTable").highlight($("#searchBox").val());

Just put the highlight CSS class in your stylesheet styles like you want and that’s it:

.highlight { background-color: yellow }

Leave a Comment