Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Prevent hiding megameny by click

Home Forums Latest release 1.1.x Prevent hiding megameny by click

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9041
    sashabeep
    Participant

    How to prevent hiding megamenu on ipad when clicking JS links in megamenu dropdown?

    How to stay megamenu opened?

    #9043
    admin
    Keymaster

    Hi, you could use any of the following which have slightly varying behavior:

    1) the hideOnClick: false option – this will prevent any sub menus from being hidden when an item (or link inside a mega menu) is clicked and will also prevent hiding the menus when you tap elsewhere on the page on iPad.

    2) the following code ondomready (e.g. put it right after your SmartMenus init code):

    $('#main-menu').on('click', function(e) {
      if ($(e.target).closest('.mega-menu').length) {
        e.stopPropagation();
      }
    });

    This will only prevent hiding any mega menu when any element inside it is clicked.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘1.1.x’ is closed to new topics and replies.