Friday 26 March 2010

How do I determine the state of a toggled element?

You can check the state using the :visible or :hidden selectors.

var isVisible = $('#myDiv').is(':visible');
var isHidden = $('#myDiv').is(':hidden');
 
 
Here is() function is used to check whether  div is visible or not.
Cheers!

No comments:

Post a Comment