[jQuery] Check element visibility

[jQuery] Check element visibility

$("p").css("display");
<!----------------//------
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
andy@icglink.com
615.370.1530 x737
--------------//--------->
-----Original Message-----
From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com]On
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 element is visible or not (i.e. has
display:block).
I have the folowing situatioin - I need to hide all <li class="label">
elements that have ALL their <li class="clearfix"> descendant hidden.
(if one or more of the <li class="clearfix"> descendants is visible, then
the
"label" must stay visible). I intend to do sometning like that:
$("div.specifications li.label").each(function() {
to_hide = 1;
$(" li.clearfix", this).each(function() {
if($(this).IS_VISIBLE to_hide = 0;
})
if($.trim(this.innerHTML) == '&nbsp;')
$(this).parent().parent().toggle();
if(to_hide) {
$(this).hide();
}
})
What might IS_VISIBLE be ?
Any hints ?
--
Best regards,
Stoyan mailto:fullgarbage@gmail.com
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/














































    • Topic Participants

    • andy