How do I check if an element is hidden in jQuery?
How do I check if an element is hidden in jQuery? It is possible to toggle the visibility of an element, using the functions .hide() , .show() or .toggle() . .hide() .show() .toggle() How would you test if an element is visible or hidden? It's worth mentioning (even after all this time), that $(element).is(":visible") works for jQuery 1.4.4, but not for jQuery 1.3.2, under Internet Explorer 8. This can be tested using Tsvetomir Tsonev's helpful test snippet. Just remember to change the version of jQuery, to test under each one. – Reuben Feb 1 '11 at 3:57 $(element).is(":visible") This is related although a different question: stackoverflow.com/questions/17425543/… – Mark Schultheiss Mar 22 '16 at 19:20 What is your definition of hidden? – fabspro May 19 at 7:29 51 Answers 51 Since the question refers to a single element, this code might be more suitable: // Checks css for display:[none|block], ignores