I have a page where I need to highlight some annotations.
Annotations Returned by Service : "Golf", "Cricket", "Ice Hockey"
Content :
Peter likes to play Golf, Cricket and < b >Ice < /b > Hockey
So I used this script from this jsfiddle
$('p').highlight(['Golf','Cricket','Ice Hockey']);
This works fine till another sub tag () is encountered in between. Golf and Cricket will get Highlighted but Ice Hockey will not be highlighted. Is there a way I can make Ice Hockey also get highlighted ignoring the html tags ?