Disable click on WordPress parent menu with children
Tags: functions, jquery, menu, WordPress
I’ve got a few sites where the client has requested that main menu items that have sub-menu items not be clickable, but just be a placeholder for the sub menu items themselves.
This comes in handy, specifically, when you have drop down menus (using SuperFish, for example) — 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, but what if you don’t want the first level to take you anywhere?
Adding the following to your theme’s functions.php file will do just that.
- Random Rants (1)
- Technical (8)