PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Implementing Jump to match and highlight

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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


    • #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


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

        Comment

        Working...
        X