PDA

View Full Version : How to get Glossy Accordion menu to expand when page opens



PaddyD
08-21-2009, 06:00 PM
1) Script Title: Glossy Accordion Menu

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

3) Describe problem: I'm working on a site with both a Spry menu and a Glossy Accordion menu (this is what the client wants...not what I'd suggest) and when someone clicks on the main category in the Spry menu, and a link goes to the pages with the accordion menu, navigates around a bit with the accordion menu AND then clicks on another category in the Spry menu, the accordion menu appears on the new page in the same state it was in on the previous page, even though it may be expanded for a different program. My client would like it to expand for the program on that page instead. Is there a way to make it do that? I know very little about javascript as yet, and I couldn't figure out if there was something in the code that I could change. Please note that the Spry menu AND the Glossy Accordion menu are behaving properly - it's not an issue of two javascripts on the same page, but rather that we'd like a different behavior from the accordion menu if possible. (Though I have had one report that the Spry menu isn't showing the background colors on the dropdown in IE on Windows, but if you see that, ignore it as it's not something I'm asking about here!!)

To see what I'm talking about:
1. go to http://www.glec.org/Test
2. Click on "Schools & Programs" and then click on "Essex Academy" (for instance)
3. Click on accordion menu in Essex Academy - select Essex Academy and then go to the Overview page.
4. Now go to the TOP (Spry) menu and select anything other than Essex Academy - say "SCALE" for example. Now you will see the SCALE news page, but it still has the Essex Academy menu portion expanded. Is there any way to make it automatically expand the SCALE menu instead? Or failing that, contract the menu when a user goes to a different program. The schools and programs are all in different directories, BTW.

Any help would be greatly appreciated. I'm very green when it comes to javascript!!