$(':visible', this).length == 0 (Or 1, if the root of the context is
returned, which I'm not sure of.)
Note: This will be kind of inefficient if you're working with a big DOM tree.
- Brian
> Hello all,
>
> How can I check if a given element is visible or not (i.e. has
> display:block).
> I hav
On Dec 13, 2006, at 1:14 PM, fullgarbage wrote:
> Hello all,
>
> How can I check if a given element is visible or not (i.e. has
> display:block).
> I have the folowing situatioin - I need to hide all
> elements that have ALL their descendant hidden.
> (if one or more of the descendants is
> v
fullgarbage schrieb:
> Hello all,
>
> How can I check if a given element is visible or not (i.e. has
> display:block).
>
You can use $(...).is(":visible")
Details for :visible can be found here:
http://jquery.com/docs/Base/Expression/Custom/
--
Jörn Zaefferer
http://bassistance.de
___
$("p").css("display");
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of fullgarbage
Sent: Wednesday, December 13, 2006 12:14 PM
To: discuss@jquery.com
Subject: [jQuery] Check element visibility
Hello all,
How can I check if a given e
Hello all,
How can I check if a given element is visible or not (i.e. has
display:block).
I have the folowing situatioin - I need to hide all
elements that have ALL their descendant hidden.
(if one or more of the descendants is visible, then the
"label" must stay visible). I intend to do sometn