PassMark Logo
Home » Forum

Implementing Jump to match and highlight

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • toonbon
    Junior Member
    • Mar 2011
    • 11

    #1

    Implementing Jump to match and highlight

    I'm trying to implement the Jump to match and highlight feature. My page links to the highlight.js file, I have my body tag set up as

    <body onload="highlight();">

    and I have the feature checked in the Results Layout page of the Zoom configuration. I can see that it's trying to work because when I select a search result it goes to the page and scrolls down to the found word, but the word is not highlighted. I didn't see any style for this.

    What did I miss?

    Thanks for your help.
    Steve
  • David
    Administrator
    • Dec 2004
    • 4714

    #2
    The details are in this FAQ
    http://www.wrensoft.com/zoom/support/highlighting.html

    As noted in the FAQ you need this style.
    <style type="text/css">.highlight { background: #FFFF40; }</style>

    If this doesn't work, can you post the URL to the search function and the search word you are using.

    Comment

    • toonbon
      Junior Member
      • Mar 2011
      • 11

      #3
      Got it! Sorry for missing that. It works now.

      One issue, though, is that the scrolling scrolls exactly to the line containing the found word. I would prefer that it scroll to the context of the word, i.e., show a couple of lines before the found word. Is this possible?

      Thanks
      Steve

      Comment

      • David
        Administrator
        • Dec 2004
        • 4714

        #4
        Is this possible?
        Not without some new Javascript code being written in the hightlight.js script.

        Comment

        Working...