View Full Version : Accordion Menu Help!

12-22-2008, 06:11 PM
1) Script Title: Accordion Menu Script

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

3) Describe problem: I'd like to use this for my website's navigation. However I need it to direction to a page when a header is clicked as well. For example, for any one of the menu headers that are to expand when clicked on they direct to a page and they expand the menu. The menu here only expands when a header is clicked instead of both. Is this possible? Thanks in advance!

12-22-2008, 10:47 PM
You could set the headers to expand/ collapse onMouseover instead of onClick. When you do that, any link within the header will respond to a normal click, so when the user moves over a header, it expands, and when they click on the header, he's taken to the target page. If you have persistence enabled within the script, that same content should still remain open on the target page.

12-23-2008, 01:00 PM
that'd be acceptable! Unfortunately I know absolutely nothing about javascript ; ;! Could you point me to where these changes need to be made?

12-23-2008, 01:10 PM
Find this code in step two:

revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
and change it to this:

revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"

To enable persistence, make sure this part is set to true:

persiststate: true, //persist state of opened contents within browser session?

12-23-2008, 01:46 PM
config.revealtype=/^(click)|(mouseover)$/i.test(config.revealtype)?config.revealtype.replace(/mouseover/i, "mouseenter") : "click"

this is the line of code that I found.. Is this the same thing? lol

12-23-2008, 02:11 PM
Nevermind I found it! I was looking in the javascript file and that code you mentioned is in the actualy html files. Thanks a lot it works like a charm now!!!