• Resolved champdor

    (@champdor)


    Dear MAx Mega Menu,

    We are building a mega menu just like on https://www.maisonsdumonde.com/ -> Produits

    This is where we are now: https://fl4m1ng0.posdev.hu/ -> Termékek

    The first problem is if we click on a menu item on the left the first submenu appears all right but on click of the second menu item the first submenu stays visible and overlaps the second.

    How can we make the first (previous) submenu disappear. Do you have some jQuery for this?

    All the best,
    Champdor

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Champdor,

    Thanks for posting a link. I’m not sure how you’re making that effect, bit I guess you are using custom JavaScript, so you would need to debug this yourself.

    We do have a tabbed feature already built into Pro, there is a demo on the homepage and the documentation is here:

    https://www.megamenu.com/documentation/tabbed-mega-menu/

    Regards,
    Tom

    Thread Starter champdor

    (@champdor)

    Hi Tom,

    I’m getting closer in understanding but not in making it work.
    No, no custom jQuery is in use so far. Only MMM settings.

    1. I still need to make open submenus disappear if another menu item is clicked. I boiled down that I need to remove .mega-toggle-on class from the other menu items. I tried this code (and several other versions of it):

    jQuery(document).ready(function ($) {
    	var $allOpenSubmenus = $('#mega-menu-wrap-primary #mega-menu-primary li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-collapse-children.mega-toggle-on');
    	
    	$('#mega-menu-wrap-primary #mega-menu-primary li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-collapse-children > a.mega-menu-link').click(function (e) {
    		var target = $( e.target );
    		$allOpenSubmenus.not( target.parent() ).removeClass('mega-toggle-on');
        });
    });

    But I suck at jQuery.

    2. I will need to put the submenus to the top of the mega menu—not in line with its parent.

    3. I need to make the mega menu to reach the bottom of the page because the Tiles submenu is out of the mega menu space. How can I make my mega menu full screen?

    Regards,
    Champdor

    Plugin Author megamenu

    (@megamenu)

    Hi Champdor,

    I’m sorry but this is a level of customisation that I do not support on the free forums. Tabbed functionality (what you’re trying to replicate) is already built in to the pro version and would solve 1 and 2 for you.

    Regards,
    Tom

    Thread Starter champdor

    (@champdor)

    Thank you. I will look into Pro then.

    All the best,
    Champdor

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide other submenus when menu item clicked’ is closed to new replies.