0

I have a question about a good approach to search body content and highlight the meaning of specific words. What I want to accomplish is to use a database with a large number of words and meanings. A script should then search the body content and highlight the words.

I found a interesting jquery plugin to accomplish this:

http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html

Example:

$('body content').highlight('bla1');
$('body content').highlight('bla2');
$('body content').highlight('bla3');

etc

The main challenge at this moment is what to do with the performance. If the number of words to highlight is 1000 I can't run the script a 1000 times, can I? What are your idea's to accomplish this?

Erhnam
  • 901
  • 2
  • 13
  • 23

1 Answers1

0

You should try to define only those words which user asks to, i mean jquery allows the double click function , so when user double clicks word, make a small popup which makes a ajax query to dictionary db, this will optimize and is a practical idea , i hope

shashikant_
  • 122
  • 5