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.