posted 5 years ago
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.