So this is the functionality I need to clean up:
I need to create a function where viewers can click on any word in a sentence, and it will be highlighted. However,
A similar solution to Jorg's, with some variations. I've done the wrapping with split() and join() instead of regex. I also tend to put my jQuery chains on separate lines for visual clarity.
Here is a sentence. Here is another sentence. Here is yet another sentence.
Here is a sentence.
Here is another sentence.
Here is yet another sentence.