simona6 Posted March 15, 2022 Share Posted March 15, 2022 We have come across a problem, that is solved on many other websites. Let's say you have a shop website, with Mens, Womens, Housing... and so on. On Desktop you hover over Mens and up comes the menu. But on Tablet, you tap on Mens and up comes the menu. But in WordPress this doesn't happen. when you Tap Mens it goes to the Mens page. Is there a simple JS or Functions.php that can be added, so that the 'first tap' simply expands the menu, and a second tap opens the page. Great examples are these: https://www.johnlewis.com https://www.houseoffraser.co.uk Both have main menus, and the dropdowns work. and only open their parent pages on the SECOND tap. You might select Mens or Womens, and the dropdown menu appears. When you select Mens again, it goes to the 'Mens' page. How do you achieve this in WordPress? I found this possible answer: https://www.tbare.com/2014/04/disable-click-on-wordpress-parent-menu-with-children/, but annoyingly, his answer is how to disable it completely, but is it a means to a solution? I want his "Safari on iOS handles SuperFish pretty well – the first tap drops down the menu, and the second tap will actually take you to that page"..... Can his coding be tweaked so that for these parent menu links, they open the page on 'taps'... on only the second tap? Can someone please help, so we can add a script that does it perfectly? Quote Link to comment https://forums.phpfreaks.com/topic/314602-in-wordpress-how-can-you-disable-the-first-tap-of-parent-menu-for-tablets/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.