简体   繁体   中英

Two horizontal lines with Mega Drop Down Menu

I'm using well known Mega Drop Down Menu plugin from here . It is working fine but not if you want to make two lines of menu. I create an example here : jsFiddle There is a problem on second line menu is too height when you hover on it. Thank you for help.

I am not positive if this menu was designed to be used in this manner but you could do something like:

$('#mega-menu-1').dcMegaMenu({
    rowItems: '3',
    speed: 0,
    effect: 'slide',
    event: 'hover',
    fullWidth: true,
    beforeOpen: function() {
        $(this).find(".mega").css("top", 40 + $(this).offset().top-$(this).parent().offset().top);
    }
});

Basically to change the menu top beforeOpen depending on the offset of the menu item selected.

http://jsfiddle.net/r0m4n/HJGFW/10/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM