Accordion Menu / Posts /

Add multiple accordion menus on the same page

18
Hey Menucool,
I want to add multiple accordion menus on the same page. Would you give a hint how to do it?
Sridhar  3 years ago   viewed: 8019    

1 Answer

1

Suppose you want to include two accordion menus in a page.

JavaScript:

You can use the single accordionmenu.js file for both the accordion menus, with the following update:

var amenuOptions1 = { menuId: "acdnmenu1", linkIdToMenuHtml: null, expand: "single", license: "mylicense" }; var amenuOptions2 = { menuId: "acdnmenu2", linkIdToMenuHtml: null, expand: "single", license: "mylicense" }; var amenu1 = new McAcdnMenu(amenuOptions1); var amenu2 = new McAcdnMenu(amenuOptions2); /* Accordio ... (the followings remain unchanged)
CSS:

Make a copy of the accourdionmenu.css, and rename the two copies of the CSS file as:
accordionmenu1.css, accordionmenu2.css.

In accordionmenu1.css, replace all #acdnmenu with #acdnmenu1;

In accordionmenu2.css, replace all #acdnmenu with #acdnmenu2.

Milo   3 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: