This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am newbie in both JS and Sizzle, trying to implement a system
that generates links according to a keyword like Google AdSense do.
I ve searched and decided to use Sizzle CSS Selector for this.
I have an html document and a keyword, I want to search all keywords in
the document body which are not in a link(a, area, etc.) tag.
Selector code and replace operation
After changing keywords with links, the output content is
It changes all keywords in the document. The second keyword would not be changed according to my system. Because it has 2 "a" tags like <a><a></a></a> I need a selector to select elements which are not childen of any link tags.