Drop Down Menu / Posts /

Add two menus in the same page

-1

Can I add two ddmenu in the same page? 

David  7 years ago   viewed: 7684    

4 Answers

3

Below are the steps to add multiple menus into the same page. 

HTML

<nav id="ddmenu">(...this is the first menu...)</nav> ...... <nav id="ddmenu2">(...this is the second menu...)</nav>

JavaScript ddmenu.js:

Open the ddmenu.js with Notepad, and make the following changes:

var ddmenuOptions={ menuId: "ddmenu", linkIdToMenuHtml: null, open: "onmouseover", // or "onclick" delay: 50, speed: 0.3, license: "mylicense" }; var ddmenu2Options={ menuId: "ddmenu2", linkIdToMenuHtml: null, open: "onmouseover", // or "onclick" delay: 50, speed: 0.3, license: "mylicense" }; var ddmenu = new Ddmenu(ddmenuOptions); var ddmenu2 = new Ddmenu(ddmenu2Options); /* Menucool Drop Down Menu v2015.8.19 Copyright www.menucool.com */ (...the script remains to be a single copy and untouched...)

CSS:

Open the ddmenu.css, copy all the content and paste it to the bottom of the file. Select and highlight all the newly pasted content, and use the search and replace tool to update all the #ddmenu to #ddmenu2.

Milo   7 years ago
1

Hi I may you please explain why linkIdToMenuHtml should be null? And what does it actually do?
Thank you!
var ddmenuOptions={ menuId: "ddmenu", linkIdToMenuHtml: null, open: "onmouseover", // or "onclick" delay: 50, speed: 0.3, license: "mylicense" };

Zhay
  6 years ago
-1

It is explained here: One menu for all pages

Milo   6 years ago
0

I have a site menu set up with ddmenu which works nicely. On some pages I want to have a second menu linking to anchors on the page. To be more specific, each of those pages contains code for a number of fiddle tunes (up to just over 100 on one page). The second menu will contain an alphabetical listing of tunes, broken down into several sub-menus to keep the lists manageable.

There are seven pages of tunes, each fitting a different category (e.g. "Reels", "Jigs", "Marches"). Each category appears identically on two separate pages, so I need seven instances of the second menu. The menus will use the menu icon at all page sizes; it will be placed out of the way of the way of the main menu.

I've thought of a number of possible strategies to get each menu to show only on the appropriate page, but I'm not sure which is best, or even which might work. I would love to get some ideas about how best to accomplish this.

Peter Y
  2 months 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: