Well, turning off persistence in the menu is easy enough:
Code:
ddaccordion.init({
headerclass: "expandable", //Shared CSS class name of headers group that are expandable
contentclass: "categoryitems", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: false, //persist state of opened contents within browser session?
However, regarding the second part of your question, if I understood you correctly, you're basically asking how to get the menu to auto expand to the one that corresponds to the current page's URL. There's quite a lot of threads on this. Basically, it comes down to doing this yourself based on how your site URLs are structured and what you have at your disposal in matching the current page's URL to one of the menu links. As far as the script is concerned, the best it can do is let you modify your menu links with a URL parameter to explicitly expand a particular menu item on the target page, ie:
Code:
<a href="target.htm?headerclass=index1,index2,etc">Target Page</a>
See this page for more info.
Bookmarks