View Full Version : Setting the expanded index from JS in the onInti() function

02-24-2011, 07:26 PM
1) Script Title:
Accordion Menu

2) Script URL (on DD):

3) Describe problem:
I am using the accordion menu script on a site I am building. However the main page is using a suckerfish type menu. Is there anyway to program the onInit function to set the expanded index correctly? I know which menu item should be active I just don't know what directive/variable I would have to set to change the active index.



02-24-2011, 11:55 PM
I'm a little confused- are you asking how to select a particular menu in the "suckerfish" menu item using the oninit() event of the Accordion Menu, or an item within the Accordion menu itself? If the later, you can get a specific item within the accordion menu to expand when the page loads by calling the function expandone() (see this page (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm)) within the oninit() event handler (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment2.htm).