jQuery highlightText uses the HTML 5 'data-' attribute to pass the desired text pattern to be highlighted.
This text pattern is then matched against the block of text contained in the HTML tag with the 'data-' attribute applied and a CSS class is wrapped around each found instance.
This CSS class can then be styled as the user sees fit, coming by default with a yellow background color.
An example is included with the download package, to get developers going on their own implementations.
22
Posted on: 18 Jul 2023 22:27 by A. Brown111
Posted on: 18 Jul 2023 22:24 by A. BrownHacked by !Sc-sT
Posted on: 03 Apr 2015 11:11 by A. BrownHacked By !Sc-sT
Posted on: 17 Mar 2015 07:57 by A. Brown
| Tweet |