Demo

The idea

Highlighting the matched words on a search results page is not a new idea.
It is not always obvious where the keywords are in the page, especially if the page
is long with a complex structure. Often the page topic does not match the user’s
intended search.

By highlighting the matched keywords, the user can quickly scan and find the relevant
parts for his query.

How it works

It’s easy. The key is the unique SearchHighlight(options) function. With this
and a few CSS classes to define the highlight you will be up and running in 5 minutes.

SearchHighlight detects the search engine you are coming from and extracts the keywords you are searching for from the URL.
Then it finds those words in the page and adds your hilite class around them.
Additionally, You can explicitly set the words to be searched, in
which case the plugin will not make any test on the URL [1].

style_name(string, default value:"hilite")The class of the span element that wraps the words to be highlighted.

style_name_suffix(boolean, default value:true)True indicates that each style will be incremented with a number. (hilite1, highlite2, hilite3...) This is useful to find specific matches and style them differently.

engines(array of regular expressions, default value:null)Adds regular expressions to detect more search engines.
The first array item is the regular expression that matches the domain.
The second array item is the regular expression that matches the parameter containing the words to be searched for (query string)
Ex: [/^http:\/\/my\.site\.net/i,/search=([^&]+)/i]
allows to detect the domain http://my.site.net as a search engine and extracts the words to be searched for from the search parameter.
http://my.site.net?search=searched_words

highlight(jQuery selector or object, default value:null)Use this option to limit the Highlighting to a specific area of the page. Null is the entire document. If no elements are found the plugin consider the entire document as well.

nohighlight(jQuery selector or object, default value:null)Use this option to exclude the Highlighting from a specific area of the page. It has priority on the highlight option.

keys(string, default value:null)Allows to explicitly set the words to be searched for, while disabling all the tests against the referrer. Useful to disable search engines highlight and to highlight words extracted from page url or from the DOM.

P.S.

Thanks to Glen Lipka for his help with the English translation and its ideas to make a better plugin.

I m using jQuery plugin "jquery-1.3.2.min.js" in my solution for popup window. If I am inculding this plugin in my solution then glossary tooltip working fine in IE browser but it is not working in other browser. But if I exclude "jquery-1.3.2.min.js" then tooltip is working in Safari, Firefox and IE.

also if a term has two words or special character then this solution is not working.