Revision: 45575
Updated Code
at May 4, 2011 07:12 by sguduru
Updated Code
var template: '$1<span class="highlight">$2</span>$3'; var pattern = new RegExp('(>[^<.]*)(' + keywords + ')([^<.]*)', "ig"); var content = $('body').html(); $('body').html(content.replace(pattern, template));
Revision: 45574
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 4, 2011 07:09 by sguduru
Initial Code
var template: '$1<span class="highlight">$2</span>$3'; var pattern = new RegExp('(>[^<.]*)(' + o.words + ')([^<.]*)', "ig"); var content = $('body').html(); $('body').html(content.replace(pattern, o.template));
Initial URL
http://www.techtricky.com/highlight-text-with-jquery/
Initial Description
Initial Title
Highlight Search Terms on page using jQuery
Initial Tags
jquery, text
Initial Language
jQuery