jQuery: multiple span creation from an array of strings

yenizle

New Member
I have a program that is supposed to take key words and highlight/color them with CSS. I'm using jQuery because I want to eventually alter which words are highlighted, all done by the user. Right now the problem isn't that nothing is getting highlighted (yay), but instead that not everything is not getting highlighted (oh no). I have several words set up to go through and get highlighted (balloon, Dorothy, cyclone) but often what happens is that not all, if any, of certain words get colored. Hopefully this jsFiddle thing helps explain it better than I can. You'll notice by the second line that the first word and keyword, Dorothy, isn't red like I would expect.thanks. sorry if I'm too incoherent or anything, feedback is appreciated
 
Back
Top