PDA

View Full Version : Accordian Menu



hgmd
02-19-2008, 10:13 PM
1) Script Title: Accordian Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ordionmenu.htm

3) Describe problem: I may have a misinterpretation of this scripts abilities. I am trying to use this script for a persistent navigation menu that is on every page. The persistent state of the menu it's self is not working as I would like.

My new perception of how this script works is that the links take you away from the page the menu resides on. When you return to that specific page via, say the "back" button, it will have the last opened menu still open just as when you left that page. In this manor the script works fine for me.

What I would like it to do (and where I think I may be misunderstanding the script as its not working for me), is as I select a link, it takes me to the next page which has the menu on it also, and that menu group still open. THEN when I go to another menu group and select a link, that group stays open.

Are my suspicions correct, and can this script perform as I would like? If not, any other ideas?

ddadmin
02-19-2008, 10:54 PM
What I would like it to do (and where I think I may be misunderstanding the script as its not working for me), is as I select a link, it takes me to the next page which has the menu on it also, and that menu group still open. THEN when I go to another menu group and select a link, that group stays open.

Yep, that's what it should do. However, if page A and B on your site resides in two different directories within your site, then the persistence feature won't persist across these two pages. To change that, do the following:

1) Make sure the accordion menu on both pages are initialized to the same header class name, ie:


ddaccordion.init({
headerclass: "expandable", //Shared CSS class name of headers group that are expandable

2) Inside ddaccoridon.js, modify the below line by adding the code in red:


document.cookie = name + "=" + value + "; path=/"

hgmd
02-19-2008, 11:19 PM
WOW- fast response and it now does EXACTLY what I wanted it to do. I really like this script and appreciate your assistance.