HTML:
<div id="box">my box</div>
How come I can hide a visible div like this: http://jsfiddle.net/FfaVW/2/
CSS:
#box {
visibility:visible;
}
JS:
jQuery('#box').hide();
But I can’t show an hidden div like this: http://jsfiddle.net/FfaVW/1/
CSS:
#box {
visibility:hidden;
}
JS:
jQuery('#box').show();
show() alters the display CSS property, not visibility.
http://api.jquery.com/show/
It will show a display: none for example.
http://api.jquery.com/visible-selector/
Offers insight as to why jQuery behaves this way: