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();

No comments:

Post a Comment