WordPress.org

Ready to get started?Download WordPress

Forums

Find In Page Plugin/Script (5 posts)

  1. TheNokiaReview
    Member
    Posted 4 years ago #

    Is there any way of implementing a search functionality on a particular page and have the search display matching words directly on the page. Say if there's a long list of items on a page and you want the customer to easily find the item, and so instead of them using the browser's 'find in page' tool, they can simply enter their keyword in the search box.

    Basically a 'ctrl+F' solution to find text on a page in the form of a search box.

    Hope there's a way.

  2. TheNokiaReview
    Member
    Posted 4 years ago #

    I've found a few different ways but they all depend on which browser is being used. Anyone have a universal code?

  3. TonoOrtiz
    Member
    Posted 3 years ago #

    I'm looking for something like this. Have you found something?

  4. iftomkins
    Member
    Posted 3 years ago #

    I'm looking, too!

  5. iftomkins
    Member
    Posted 3 years ago #

    This is the best thing I've found so far: http://www.seabreezecomputers.com/tips/find_custom2.js
    (code to insert in your HTML is included in the intro section).

    You can modify the styling of the pop-up box to match your CSS (default colors are rough). I made mine straight up gray: Modified JS is here: http://www.nextgenresale.com/wp-content/themes/TheCorporation/js/find_in_page.js

    Main Drawbacks I've found:
    -In Firefox, it disables the Control-F keyboard command
    -Because it uses floating divs, sometimes when you hit next, the find on page window disappears from view. Confusing. But this only happens sometimes.

    Overall: Better than nothing, but not a great solution.
    Interesting: It has an option for Firefox only to trigger the native browser Control-F function! This is perfect, if only it didn't a) disable the actual keyboard Control-F command in Firefox, and b) if this also triggered the native Control-F find function in other browsers.

Topic Closed

This topic has been closed to new replies.

About this Topic