[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) == ' ') $(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/