jQuery Tip: How to test if something is hidden with jQuery

x theme
(Last Updated On: July 10, 2014)

We know that it is possible to toggle the visibility of any element in jQuery. We use .toggle(), .hide() or .show() for doing this. But what you will do if an element has been shown or hidden using jQuery?


I’m sharing a simple tip for how to test if something is hidden with jQuery.


The above line of code checks if display is block or none, and ignores that visible is true or false.

Related posts:

About the author


Leave a Reply

Your email address will not be published. Required fields are marked *