Give help. Get help.

  • # November 21, 2017 at 3:05 am


    I don´t undersand JS and if anyone help me with this I apreciate.

    I have a menu with hover to the sub-menu, but all the parent have href. What I need is in mobile is to avoid in the first click goes directly to href url.

    My menu is something like this:

    Thank you in advance

    # November 21, 2017 at 4:02 am

    You could handle the click event on the anchors then and maybe check for something, an active class for example, and when it matches the class active, do the click result, otherwise return false.
    The default handling of href isn’t done by javascript by the way.

    # November 21, 2017 at 6:37 am

    Have you considered changing your menu markup so the parent buttons aren’t linked? You could repeat the parent button/link as the first item in a sub-menu. More info + ‘sticky hover’ fix here:

    I’ve come across a script called “DoubleTapToGo” that does something like JeroenR mentioned. That might offer a drop-in solution, but I’d personally opt for a menu restructure.

    # November 21, 2017 at 9:55 am

    Hi @beverleyh and @JeroenR
    Thank you for your reply.

    After I post this issue, I have also find the js “DoubleTabToGo” and I have tested, and works. But I will see the “hover-ios-vs-android” post and I will examine the possibility of amending or restructuring my menu.

    Thank you both.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.