If I have the HTML below:
<div style="display:none;">
<span id="hello">Hey</span>
</div>
And I do alert($("#hello").css("display"));, it will say “inline”. The span is clearly not visible, but since it doesn’t directly have a display:none; property on it, it still says it’s viewable.
How do I test whether a certain DOM element is actually visible or not, even if its parent or a parent of its parent is not displaying?
You can use:
Items still animating (like using
.hideor.fadeOut) will be “visible” until the animation is complete