PDA

View Full Version : Accordion Menu script help needed...



merchantweb
07-21-2009, 01:50 AM
1) Script Title:

Accordion Content script (v1.7)

2) Script URL (on DD):

http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem:

I need to disable the "default expanded" feature so that when a page loads the submenu is hidden on all menu items. Any help is greatly appreciated!!

ddadmin
07-21-2009, 08:52 AM
Have you tried simply setting "defaultexpanded" to "[] in your initialization code:


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: 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.

merchantweb
07-21-2009, 01:03 PM
Here is a link to my script:
http://www.joeymerchant.com/aai/ddaccordion.js

I tried looking for such an option but my .js file seems slightly different.

ddadmin
07-21-2009, 06:56 PM
The defaultexpanded: [], option is not found inside the .js file, but rather, the initialization code in the HTML of your page itself that shows the Accordion Menu.