JavaScript find box

Posted by cf_PhillipSenn on Stack Overflow See other posts from Stack Overflow or by cf_PhillipSenn
Published on 2010-05-18T14:39:58Z Indexed on 2010/05/18 14:50 UTC
Read the original article Hit count: 267

Filed under:

I'd like to duplicate the find feature (Ctrl-F in Firefox) for my users. In other words, a text box that as the user types, it finds the first occurrence of that text, and if they press "Next", it highlights the next occurrence and moves the page if necessary.

I'm thinking the search input would have to be in a div that remained fixed, and as it found what it was looking for, would insert a named anchor just before it and then follow the hyperlink.

Do you think this can be done?

© Stack Overflow or respective owner

Related posts about jQuery