Results 1 to 6 of 6

Thread: How to make the mega menu to be shown by click instead of hover ?

  1. #1
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    81
    Thanks
    5
    Thanked 1 Time in 1 Post

    Lightbulb How to make the mega menu to be shown by click instead of hover ?

    1) Script Title: DD Mega Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...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 ?
    Code:
    rel="anylinkmenu2[click]"
    Anyone can help ?
    Last edited by naremkim; 07-25-2011 at 01:59 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,895
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Sure, try the below modified .js file.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    naremkim (07-26-2011)

  4. #3
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    81
    Thanks
    5
    Thanked 1 Time in 1 Post

    Lightbulb Wonderful ! Thanks, ddadmin.

    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
    Code:
    <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>
                      <b>
    	<div class="column">
    	<ul>
    	<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.
    Last edited by naremkim; 07-26-2011 at 09:33 AM. Reason: completion

  5. #4
    Join Date
    Aug 2004
    Posts
    9,895
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

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

    Code:
    ddmegamenu.docinit({
    	menuid:'megaanchorlink',
    	dur:500,
    	trigger:'click',
    	easing:'easeInOutCirc' //<--no comma after last setting
    })
    Be sure the download the updated .js file on the script page first.
    DD Admin

  6. #5
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    81
    Thanks
    5
    Thanked 1 Time in 1 Post

    Arrow

    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.
    Last edited by naremkim; 07-28-2011 at 01:44 PM. Reason: completion

  7. #6
    Join Date
    Feb 2010
    Location
    Toronto
    Posts
    81
    Thanks
    5
    Thanked 1 Time in 1 Post

    Arrow

    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 ?
    Last edited by naremkim; 08-01-2011 at 07:52 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •