Log in

View Full Version : Stupid Simple Help with a Dynamic Drive Script. The Accodion Menu



cyote101
03-20-2011, 12:47 AM
Hi all, Please forgive my ignorence on this one. I'm supprised i can't figure it out. maybe it's the fact that I'm tired, probably not.

Ok well here it is. i'm using this script (http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm) all works fine and i've been able to install it and get it working.

But, i can not figure out how to set a Submenu to auto expand on page load. Now it does have a single line of commenting in the JS on how to do this, but i'm not sure what to do, exactly. so any help from you all would be awesome.

Like where do i insert the index id in the html or, do i not have to. anyways i can go over everything i've tried but it's all wrong, obviously, so instead i will just thank you guys in advance for your awesome help.

Thanks,:)

jscheuer1
03-20-2011, 08:36 AM
I think you mean:


defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content

This is more fully explained on the index page for the script:

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


defaultexpanded:

Index(es) of content(s) that should be open by default in the format [index1, index2, etc], where 0=1st content, 1=2nd content etc. [] denotes no content should be open by default.

So, for example, if you wanted the first one expanded, you would use:


defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content

If you want the second and third ones expanded:


defaultexpanded: [1, 2], //index of content(s) open by default [index1, index2, etc] [] denotes no content