jQuery.info
Découvrir et utiliser jQuery, la librairie javascript du XXIIème siècle

Home page > Plugins > The plugin "SearchHighlight" > The plugin "SearchHighlight" > Post a message

Post a message

Replying to:

  • The plugin "SearchHighlight"

    31 March 2010 21:34, by Jake
    Nice plugin- thanks for putting it together. If anyone needs a simple highlighting function, you can use... jQuery.fn.highlight = function (str, className) var regex = new RegExp(str, "g"); return this.each(function () this.innerHTML = this.innerHTML.replace(regex, "" + str + ""); ); ; $(function() $("li").highlight("how","highlight"); $("li").highlight("today","highlight"); ); //CSS .highlight background-color: (...)

Forum registration required

Prior to participating in this forum, you must register. Thank you for entering the personal identifier supplied to you. If you are not already registered, you must register.

[Connection] [register] [password forgotten?]


Latest comments