Trying to use contains selector within nested divs

Posted by James on Stack Overflow See other posts from Stack Overflow or by James
Published on 2010-03-31T08:05:09Z Indexed on 2010/03/31 8:13 UTC
Read the original article Hit count: 413

Filed under:
|
<div>
    <div>test</div>
</div>

$("div:contains('test')").css('display','none');

I know I am going to kick myself on this. The problem is that when this runs all divs are hidden due to nesting. How do I make it so that the parent div does not get hidden? I am limited to using 1.2.6

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about contains