A question arose recently about how to highlight a word or words in the text of a
div element. It turns out that it's actually pretty easy using Prototype.
The example below is the code needed to highlight each occurrence (up to ten of them) of the word 'pick' in the div. The operation will be performed when the content div is clicked.
Note: I used to Google-hosted version of the prototype library which is handy. This could easily be refactored to do
any sort of style operation to the selected text, or replace it altogether. I will have to give this a try with JQuery as a comparison.