The procedure is very similar. First, make sure the toggle button currently being toggled is the one you want to manipulate, then just change its CSS class name using JavaScript.
Assuming your toggler buttons carry the id "somename-toggler", and the corresponding collapsible DIV just "somename", here is a sample ontoggle event definition:
Code:
animatedcollapse.ontoggle=function($, divobj, state){
if (divobj.id=="peter" || divobj.id=="sarah") //only react to collapsible DIV named "peter"
document.getElementById(divobj.id+"-toggle").className=(state=="block")? "opened" : "closed"
}
Changing CSS properties is exactly the same, via obj.style.cssproperty=value.
Bookmarks