What is the easiest way to programmatically find the current toggle state of a DOM element when using the slideToggle() function in jquery 1.3.2?
I expected there to be a property for this, but I can't seem to find one. Directly checking the CSS display or height seems like a hack, but maybe that's what one is expected to do.
I think you can do something like this,
if($("#panel").is(":hidden")) { // do stuff }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With