The oninit() event probably would work best here. Basically, inside it, you'd check the current page URL against a list of file names that should mean the menu should be collapsed, and if found, collapse the menu. Something like:
Code:
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
var currentpageurl=window.location.href
var closedpages=['index.html', 'about.html', 'test.html']
for (var i=0; i<closedpages.length; i++){
if (currentpageurl.indexOf(closedpages[i])!=-1){ //if current page matches one of the closed'
ddaccordion.collapseall(this.headerclass)
break
}
}
},
Bookmarks