Skip to content

trimentor/jquery-highlightText

 
 

Repository files navigation

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.

About

Simple Text Highlighting via Unobtrusive JavaScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published