Hi there,
I suspect that the problem has to do with putting an HTML string inside the contains parens, when it is supposed to take only text. Does it work if you just do $('a:contains(undo)') ?
--Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com On May 27, 2008, at 2:06 PM, EuGeNe wrote:
Hi there, I am troubled by the behavior of the :contains filter I have an a tag <a class="undo" href="/tag/poesie/5">undo</a> I can select it with $("a.undo") and play with the chain not problem e.g. $ ("a.undo").remove() works fine if I use $(':contains(<a href="/tag/sagesse/4" class="undo">undo</a>)') or $('a:contains(<a href="/tag/sagesse/4" class="undo">undo</a>)') or $('a.undo:contains(<a href="/tag/sagesse/4" class="undo">undo</a>)') I get the "same" result "pointing" to the same tag but I can't play with it i.e. whatever I do to it doens't have an impact on the DOM. I am sure it is something I don't understand about JS or jQuery ... could somebody enlighten me? Thanks EuGeNe -- http://www.3kwa.com