Well, menu headers are part of the same "group' if they share the same CSS class name as specified in the script's intialization code for that menu:
Code:
ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
"
"
So as mentioned, if you wish an arbitrary link to close all the headers in the above accordion instance, you'd do something like:
Code:
<a href="javascript:ddaccordion.collapseall('submenuheader')">Arbitirary link</a>
Another thing: if the href in the link is now to act as a javascript command which collapses the submenus, then how is it to act as a link to another page?
That's exactly my point actually on not understanding why people's interest in having a header act both as a sub menu toggler and actual URL.
It makes sense if you're using the "mouseover" option so the headers expand the sub menus onmouseover, leaving "onclick" open to navigate to a URL using.
Bookmarks