Showing posts with label detect. Show all posts
Showing posts with label detect. Show all posts

Friday, January 28, 2011

How to detect if an element is hidden in jQuery

This will work when myID was hidden using .hide( ) and displayed using .show( )


if($("#myID").is(":visible"))
   $("#myID").hide();
else
   $("#myID").show();