View Full Version : How to make the mega menu to be shown by click instead of hover ?

07-25-2011, 01:37 PM
1) Script Title: DD Mega Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddmegamenu.htm

3) Describe problem: Is there any way to make the mega menu to be shown by click instead of hover the same like on 'click to reveal' example/demo of AnyLink JS Drop Down Menu ?
rel="anylinkmenu2[click]" Anyone can help ?

07-26-2011, 03:31 AM
Sure, try the below modified .js file.

07-26-2011, 09:20 AM
The DD Mega Menu is great. It will be the best menu of which I've ever seen so far if it gets the function of toggle mode between 'click' and 'hover' to reveal the menu. I mean like the following
<a id="megaanchorlink" href="#" rel="megacontent">
<b><font size=2 color="#009933">News</font></b></a>

<!--First mega menu (1) -->
<div id="megacontent" class="mega"><font face="arial" size="2.5">

<p style="margin:5px 0 10px 2px">Major National Newspapers/Broadcasting :</p>
<div class="column">
<li><a href="#" rel="megasubcontent[click]">Canada</a></li>
<li><a href="#">El Salvador</a></li>
<li><a href="#">Dominican Rep.</a></li>
<!--Second mega menu (1.1) -->
<div id="megasubcontent" class="mega2" ><font face="arial" size="2.5"> the first mega menu reveals on 'hover' and the second mega menu reveals on 'click'. Will it be hard to alter ? Or anyone can help ?
Please confer the menu in the center area at http://www.ehyeh.com/EhyehTest4.html.

07-27-2011, 11:05 PM
I've gone ahead and officially updated DD Mega Menu with this feature: http://www.dynamicdrive.com/dynamicindex1/ddmegamenu.htm To get a menu to activate click instead of the default mouseover, inside the initialization code for it, add the following option:

easing:'easeInOutCirc' //<--no comma after last setting

Be sure the download the updated .js file on the script page first.

07-28-2011, 12:42 PM
I got it. Thanks very very much. It has great achievement. For my website it is good enough. Thanks again. I think, one thing left to complete for it is that showing the first mega menu on either 'hover' or 'click' (it has been done) and then the second mega menu, I mean the submenu, on its reverse mode. In other words first menu shows on 'hover' and the submenu of it shows on 'click'. And one thing more is the auto repositioning of the overflow menu. Please confer News -> Ireland -> More - the last menu at the center of http://www.ehyeh.com/EhyehTest4.html.
I'll advertise your site on the Ad-sites section of ehyeh.com site. I'll delete it if you don't want.

08-01-2011, 01:32 PM
I found the 3rd, 4th, and 5th item of the menu has been volitalized when the pointer hovers on it on some browsers/compters. Each of the items were connected to different ids.
I think the DD Mega Menu is essentially needed the 'click' dropdown funtion within the 'hover' dropdowned menu. Without it it works properly only for on one lined 'hover' dropdowned menu. I think it is related the html id with css id issue. please confer http://www.ehyeh.com/EhyehTest4.html and http://www.ehyeh.com.
Anyone can help ?