Skip to content

Latest commit

 

History

History
22 lines (13 loc) · 721 Bytes

README.markdown

File metadata and controls

22 lines (13 loc) · 721 Bytes

jQuery highlightText

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.

Methods

  • highlightText(text, options): returns each element which contains a text node that matches text

Supported properties

The highlightText function accepts the following options:

  • cssClass: the CSS class name to be added to the span that acts like a container for the matched text (defaults to mark)
  • ignoreCase: turn on/off case-insensitive mode (defaults to true)

Example use

Check out the demo.html page.

Copyright

Copyright © 2013 Kjel Delaey, released under the MIT license.