Would this jQuery is.(":hidden") work?
- by AtiKuSDesign
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