I have a huge list of names (over 10 000) and I need to look for instances of any of those (not case-sensitive). I need these words as jQuery elements, so I can add functionality to them. Is there an efficient way of doing this with jQuery?
Some more info as requested: I currently have the names as an array of strings in my javascript. The code should look for the names in all text on the page. They are names of creatures, to which I want to add a tooltip using Tipsy.
If it makes any difference, this is for a chrome extension. The question is mainly about how to find that many different strings efficiently in a page. I already found a bunch of ways to do this if you're looking for only one word, though iterating over the list of words and doing it separately for each seems like a bad way of doing it.
Thanks!