showOnClick true does not allow submenu on mobile to minimise again

Home Forums Latest release 1.1.x showOnClick true does not allow submenu on mobile to minimise again

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8373
    hmartens
    Participant

    This smartmenus is amazing! Absolutely love it!

    I hope someone can guide me in the right direction.

    I have an issue at the moment (when I do not use showOnClick) where on my mobile menu I click a submenu and it drops down correctly, but when I click again it goes to the parent link or refreshes the page if my link is # on the parent dropdown.

    When I add the showOnClick true option, I can click on the link and it drops down..but when I click again on it it does nothing, it does not minimise the dropdown…it does nothing

    This is my code I’m using:


    /* Mobile Menu SmartMenus Init */
    jQuery(function() {
    jQuery('#mobile-menu').smartmenus({
    subMenusSubOffsetX: 1,
    subMenusSubOffsetY: -8,
    showOnClick: true
    });
    });

    /* SmartMenus Mobile Menu toggle button */
    jQuery(function() {
    var $mobileMenuState = jQuery('#mobile-menu-state');
    if ($mobileMenuState.length) {
    /* Animate mobile menu */
    $mobileMenuState.change(function(e) {
    var $menu = jQuery('#mobile-menu');
    if (this.checked) {
    $menu.hide().slideDown(250, function() { $menu.css('display', ''); });
    } else {
    $menu.show().slideUp(250, function() { $menu.css('display', ''); });
    }
    });
    /* Hide mobile menu beforeunload */
    jQuery(window).bind('beforeunload unload', function() {
    if ($mobileMenuState[0].checked) {
    $mobileMenuState[0].click();
    }
    });
    }
    });

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Register

You will be emailed a link to set your password.

Login

Lost password?