• Hi there,
    I’m using the WP Bottom Menu plugin which has an option to add an onclick event for custom menu items.

    I can’t for the life of me work out what the onclick code should be to get the mobile menu to toggle.

    The menu name is max_mega_menu_1, and these are the options in the display options section:

    <?php wp_nav_menu( array( 'theme_location' => 'max_mega_menu_1' ) ); ?>

    [maxmegamenu location=max_mega_menu_1]

    I managed to get the fly cart I use to trigger using ‘woofc_toggle_cart();’ but using a similar format for the sidebar doesn’t seem to work.

    Any help you can offer would be very much appreciated!

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

    (@megamenu)

    Hi japenz,

    I don’t understand sorry. Could you post a link to your site and explain it as “when I click X, I want X to happen”?

    Regards,
    Tom

    Thread Starter JapeNZ

    (@japenz)

    Hi Tom,

    Thank you for getting back to me, and sorry for the confusion ??

    Here’s a screenshot of the setting:

    So if possible I need some code to place in the onClick section that will open / close (toggle) the slideout menu when I hit the menu button.

    I hope this makes sense, please let me know if you need any additional information.

    Kind regards,
    JP

    • This reply was modified 1 year, 2 months ago by JapeNZ.
    Plugin Author megamenu

    (@megamenu)

    Hi JP,

    Thanks. You could try:

    jQuery(“button.mega-toggle-animated”).click();

    That assumes that you’re using the animated toggle button and that it is present on the page.

    Regards,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP Bottom Menu onclick event’ is closed to new replies.