Parent Link not activating submenu but icon does?

edited April 2017 in Menu / Mega menu
OK so I have a main menu with a few parent links that don't have subsequent pages but the submenu items do. In the menu builder I put a # in the url field for the parent links and all of the submenu items have links to their subsequent pages.

The trouble i'm experiencing is that once in responsive mode the parent menu item no longer triggers the submenu; instead I have to click on a tiny icon of a cross all the way to the right of the menu. Is there a fix for this? 

It's a bit of a silly oversight to not be able to open a submenu by the parent link itself especially in mobile mode.

Comments

  • Hi,
    This is normal, you are not using the main links but someone will, and then  it will become a problem. This is the only responsive menu  right now.
    thanks
  • Coded my own solution for anyone suffering from the same problem:

    jQuery(function($){

    var handlers = [
        // on first click:
        function() {
           $(this).addClass("hover");   
           $(this).children(".sub-menu").css("display", "block");
        },
        // on second click:
        function() {
            $(this).removeClass("hover");   
            $(this).children(".sub-menu").css("display", "none");
        }
        // ...as many more as you want here
    ];

    var counter = 0;
    if(jQuery(window).width() < 1240 ){
    $(".menu-item").click(function() {
        // call the appropriate function preserving this and any arguments
        handlers[counter++].apply(this, Array.prototype.slice.apply(arguments));
        // "wrap around" when all handlers have been called
        counter %= handlers.length;
    });
    }
    });
  • Hi FBarros, where you put that code? I couldn't get it working
  • Nevermind, I could done it pasting the code in custom js option in admin
  • Hey Joaera, yep you guessed it right. Just drop it in the custom JS area within betheme options. Sorry I didn't answer earlier but I hardly visit these forums unless I'm looking for a quick fix.
  • FBarros82  I Love you !  :x
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.