How do I do a case insensitive search for a word and convert it to a hyperlink using jquery?
- 阅读更多 关于 How do I do a case insensitive search for a word and convert it to a hyperlink using jquery?
问题 I want to convert certain key words into affiliate links on my website. I do not want to hand-code each one of those links in every page. So I'm looking for a Javascript/Jquery based solution where using a given a list of keywords and corresponding URLs (a two dimensional array), on page load, these keywords are 'URLified' using their corresponding URLS. I found this comment Find text string using jQuery? which has the code for a case insensitive search, but it URLifies the whole text node