PDA

View Full Version : Remote collapse the menu



dieseldave
03-31-2011, 11:58 AM
1) Script Title: Glossy Accordion Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

3) Describe problem: This code is supposed to expand a menu form a remote link.
<a href="target.htm?headerclass=index1,index2,etc">Target Page</a>

Is there a way to collapse the whole menu when the page is accessed from a remote link?

ddadmin
03-31-2011, 08:11 PM
Hmm I'm a little confused- if you wish the menu to be collapsed fully initially, why not just set the lines in red below as follows inside your initialization code:


collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //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?

In other words, with defaultexpanded set to empty and persistence of any previously open headers disabled, the menu will always default to collapsed when viewed initially.

dieseldave
04-01-2011, 12:31 AM
I use the menu to call the same page, so, as long as it is calling itself I want the menu to remain expanded, but if I navigate away and then return it should be collapsed since the data is repopulated with no filter.