I think it's a feature. It would be a huge drop in performance if all parents had to be checked for visibility every time that selector was used.

You could probably write a little function to check all the parents if you need that.

-- Josh


----- Original Message ----- From: "krassonkel" <[EMAIL PROTECTED]>
To: "jQuery (English)" <jquery-en@googlegroups.com>
Sent: Wednesday, March 05, 2008 12:34 PM
Subject: [jQuery] :visible selector



Hi there!
At first: congrats for this really great library!

But now I have a problem... I have the following situation:

<div style="display:none;">
 <span class="test">test1</span>
</div>
<span class="test">test2</span>

When I now use $("span.test:visible") I'll get both span elements
although only the second one is visible... Is that a bug or a feature?
It seems that the hierarchy is not checked...

Regards, Stefan

Reply via email to