Tag Archives: element visibility

jQuery check for element visibility

What if the element exists in the DOM

That was described in my recent post and it describes the case when you have a particular element in the DOM tree, or if that element does not exists.

example:

<div id="holder">
<div id="element_id">Hello World!</div>
</div>
console.log( $('#element_id').length )

this prints 1, because the element exists. In the following example is different. Continue reading jQuery check for element visibility