Would this jQuery is.(":hidden") work?
Posted
by AtiKuSDesign
on Stack Overflow
See other posts from Stack Overflow
or by AtiKuSDesign
Published on 2010-04-15T14:00:31Z
Indexed on
2010/04/15
14:03 UTC
Read the original article
Hit count: 193
jQuery
Hi guys,
I'm playing around with the 'is' filter in jQuery and I am currently without the opportunity to use a testing server.
What I want to know is...would this work to display both hello and goodbye?
$(document).ready(function(){
if ($("p").is(':visible')) {
$(this).css('display','block');
}
});
<p>hello</p>
<p style="display:none">goodbye</p>
Basically what I want to do is run an action on something when it is visible but not run it when it isn't.
Thanks guys
© Stack Overflow or respective owner