I am having a strange problem with checking the visibility of an object using jQuery.
I have this JS test:
alert($myObject.css('display'));
alert($myObject.is(':visible'));
The first warning displays a “block”, which makes sense, since firebug clearly shows that it is set to display: block and you can see the object on the page in the browser.
The second warning, however, displays "false". Which doesn't make any sense to me.
I misunderstand what it is (': visible')?
source
share