Simple Text Highlighting via Unobtrusive JavaScript
The jQuery Text Highlight Plugin can be used if you want to highlight query words in the User Interface.
highlightText(text, options): returns each element which contains a text node that matchestext
The highlightText function accepts the following options:
cssClass: the CSS class name to be added to thespanthat acts like a container for the matched text (defaults tomark)ignoreCase: turn on/off case-insensitive mode (defaults totrue)
Check out the demo.html page.
Copyright © 2013 Kjel Delaey, released under the MIT license.