Make Slide-in Menu Top Level Items into Links


The Divi theme's Slide-In Menu displays menu links in a vertical bar which is revealed when you click the menu button. When opened, it displays a list of top level (parent) menu items. Normally, clicking on one of these menu items takes you to the linked page. However, If a top menu item has submenu items (children) then clicking on the parent link will instead expand the list of children items. This means clicking on the parent no longer takes you to the linked page. Here's how to fix that.

Making Slide-In Parent Links Clickable with jQuery

The following jQuery code changes the behavior of the Divi slide-in menu such that only the "down arrow" toggle button will open the list of child links. Clicking on the text (or background area) of a parent link, whether it has children or not, will take you to the linked page.

			$('#mobile_menu_slide a').click(
				function(e) { 
					if ( === 'A') {

You can paste this, for example, into the "Divi > Theme Options > Integration > Add Code to the Head of your Blog" box.

This post may contain referral links which may earn a commission for this site

Hundreds of new features for Divi
in one easy-to-use plugin


  1. Dan, isn't working in my phone is still "down arrow"

    • Hey Spah, if you haven't already, try clearing your phone's browser cache. Note that the code should make it so that text of top level items can be a clickable link, rather than just opening the submenu. In this case, the down arrow will still be visible and can be used to open the submenu. I just tried this out on my test site and it's still working for me with the latest version of Divi. If the cache clearing doesn't work, are you able to send me a link to the site you're working on so that I can take a look for you? Thanks!

  2. I kinda love ya for this… Thanks

    • Ha ha! You’re welcome, Brian :)


Submit a Comment

Your email address will not be published. Required fields are marked *