Highlighting search words like Chrome with jQuery

Posted by ilkin on Stack Overflow See other posts from Stack Overflow or by ilkin
Published on 2010-03-31T07:44:26Z Indexed on 2010/03/31 7:53 UTC
Read the original article Hit count: 165

Filed under:
|

I have recently done a very simple highlighting with jQuery and a highlight plugin. It looks like this:

$('myButton').click(function() {

$('body').highlight($('#myInputText').val());

});

But I wonder how can I do the Chrome like highlighting, I mean highlight the letters whenever I type in some letter in textbox without submitting. I think maybe use a keyup event... Any ideas?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript