Support » Plugin: Max Mega Menu » Custom mobile maxmegamenu button

  • Hi,
    I have a custom burger button through which i would show/hide the max mobile mega menu.
    Can i have some help or suggestion how to handle this ?
    Thanks

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

    (@megamenu)

    Hi sb0k,

    You’ll need to use some custom JavaScript which is triggered when your button is clicked. As an example, go to the homepage of megamenu.com and reduce the browser size down to mobile width. In the console, paste in:

    jQuery('#mega-menu-demo_navigation').data('maxmegamenu').showMobileMenu();

    and

    jQuery('#mega-menu-demo_navigation').data('maxmegamenu').hideMobileMenu();

    To make it work with your menu, you’d need to update the menu selector accordingly.

    Regards,
    Tom

    Thread Starter sb0k

    (@sb0k)

    Hi, thanks for your help.
    I just tried on my test site the code you pasted, changing the selector.

    jQuery('#mega-menu-primary-navigation').data('maxmegamenu').showMobileMenu();

    i got this error:
    Uncaught TypeError: Cannot read property 'showMobileMenu' of undefined

    Plugin Author megamenu

    (@megamenu)

    Hi sb0k,

    Are you sure your selector is correct?

    “#mega-menu-primary-navigation”

    If you still need help please post a link to your site.

    Regards,
    Tom

    Thread Starter sb0k

    (@sb0k)

    Hi,
    thanks for the reply.

    Selector is fine and i cant share the url because i’m working on local.
    I get the selector from the body classes, see attached ss.
    https://pasteimg.com/image/cxjH9
    more suggestions ?
    thanks

    Plugin Author megamenu

    (@megamenu)

    Hi

    I’d need to inspect the site so please post back here once it is online and I’ll take a look.

    Regards,
    Tom

    Thread Starter sb0k

    (@sb0k)

    Dear Tom,
    thanks for the reply.
    hare you available on slack?

    thanks

    Plugin Author megamenu

    (@megamenu)

    Hi sb0k,

    I am not sorry. All support is either here or via our Pro helpdesk.

    Regards,
    Tom

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.