PDA

View Full Version : ddaccordion.js - several mains expanded



lucas
09-10-2009, 11:30 AM
1) Script Title: ddaccordion.js

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/navigate2.htm

3) Describe problem:

Bear with me, novice...

Have accodion.js set up and working fine. Only problem is that...click on 'Menu 1' and it expands. Great. Click on 'Menu 2' and it expands. Great although it also shrinks 'Menu 1'. Any way to keep all 'Main' menus expanded until a sub menu is selected?

Menu 1
Sub menu 1
Sub menu 2

Menu 2
Sub menu 3
Sub menu 4

Think I should be looking at this line...

if (config["collapseprev"] && expandedindices.length>1) //only allow one content open?

ddadmin
09-11-2009, 04:38 AM
Hmm the title of the script you mentioned (DD Accordion) and the link point to two different scripts. Assuming the former, simply set the following line in red to false:


ddaccordion.init({
headerclass: "mypets", //Shared CSS class name of headers group
contentclass: "thepet", //Shared CSS class name of contents group
revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: false, //Collapse previous content (so only one open at any time)? true/false