views:

188

answers:

1

Hi, I have started using the DataTables plugin (v1.6.2) for jQuery(v1.4.2), and I would like to ask you if you know a settings or a plugin that allow me to highlight the text used in search textbox on the filtered rows.

Thank you in advance

+2  A: 

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 }
Nick Craver
Yes, it's a great little plugin, and the code is clear enough that it's a good example of how to do this sort of thing.
Pointy