Certainly. What you put inside onopenclose() is not limited to just code that affects the menu itself, and outside of it as well.
In your case, try giving each header a unique ID, such as "header1", then for the corresponding paragraph, a ID based on the former so the two can easily be linked together, such as "para-header1". Then inside your onopenclose() event, do something like:
Code:
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
var paraid="para" + header.id
document.getElementById(paraid).style.display=(state=="block")? "block" : "none"
}
What the above does is expand or hide paragraph "para-headerx" based on the corresponding header's own state.
Bookmarks