Why getComputedStyle returns element visibility as visible even if you never set visibility to be hidden or visible.
Example:
getComputedStyle($('#block1')[0],null).visibility; --- "visible"
and at the same time:
$('#block1')[0].style.visibility --- ""
The default for most existing DOM elements that require rendering to the
documentisvisibility: visible. These properties only apply themselves once the element is rendered and are computed without being applied to thestyleobject of a DOM element. ThegetComputedStylemethod is there to pick up these rendered properties which are either from the browser's default configuration or from the stylesheet.