- This topic is empty.
November 21, 2017 at 3:05 am #262832vulkanusParticipant
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: https://codepen.io/Vulkanus/pen/yPKyeP
Thank you in advanceNovember 21, 2017 at 4:02 am #262833JeroenRParticipant
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.
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: https://css-tricks.com/forums/topic/hover-ios-vs-android/
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 #262836vulkanusParticipant
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.