Is there a way to ensure that a search result navigates/focuses to the first search hit in the topic?
Search highlighting worked as expected; I've added it into my stylesheets for my TopNav.
If the hit was inside a dropdown, it expanded the dropdown (which is fine), but didn't provide focus right to it.
Stakeholders were complaining that a search result hit didn't navigate them right in and focus on the hit. "It didn't work" (even though it actually did, it got them to the topic and highlighted instances of the term).
Can anything else be done to improve the particular behavior?
My help system is using the MadCap search engine. Due to where our site is hosted, we cannot use Google engine or Elastic Search.
Thanks!!
CAT
Search results and focus to hit in topic
Re: Search results and focus to hit in topic
The first search result on a page should be formatted as so:
Knowing this, you should be able to use some jQuery to scroll the browser to this element.
Code: Select all
<span class="SearchHighlight SearchHighlight1">*MATCHING SEARCH TERM*</span>