How do I conditionally handle when an accordion section is open. What I am asking is this (in pseudo code):
if (this-accordion-section-open){
do something
The basic HTML structure of the accordion is:
...
The way I have done it in the past is to assign a class to the tag like so:
...
jQuery UI assigns different classes to the tag based on its state.
if($('.my_accordion').parent('h3').hasClass('ui-state-active')) {
// accordion is open
}
else {
// accordion is closed
}