UI Deploy

Curated, Short, Web UI Dev we Love.

How to Check the Visibility of an Element Using jQuery?

In the  jQuery versions before 1.3.2  an element was regarded as Visible if the CSS Visibility Property of that element was not defined as “Hidden” or if the CSS Display Property of that was defined as  “Visible “ or  it was an element with an input type not equal to “Hidden”. There are several options available to test whether an element is hidden or visible with jQuery. Nowadays with the later versions of jQuery the visibility of an element is determined by taking into consideration the height and width of the element. The element is considered to be visible if the height or width of the element is greater than zero otherwise the element is considered as Hidden

view source

Advertisement