• Good morning like you can see I have a problem with the sub menu whe click a date on the calenda, Is it possible to close the sub menu only clicking on the parent?

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

Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Mike,

    Thanks for posting a link. The sub menu will close whenever an element outside of the menu (usually the page background) is clicked. In this case, the calendar view is appended to the bottom of your page HTML, then absolutely positioned into place, so the menu thinks you are clicking outside of it.

    To prevent the menu from closing when the page background is clicked, try adding this to your themes functions.php file:

    function megamenu_disable_document_click( $attributes, $menu_id, $menu_settings, $settings, $current_theme_location ) {
        $attributes['data-document-click'] = 'disabled';
        return $attributes;
    }
    add_filter("megamenu_wrap_attributes", "megamenu_disable_document_click", 10, 5);

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘Click to open and close sub menu’ is closed to new replies.