Trying to make Divi's Theme dropdown menu OnClick instead of hover [on hold]

I'm using the DIVI theme and making some relatively simple modifications to it to better suit my needs. One thing I'm having some difficulty with though surprisingly is swapping out its vertical menu's hover state drop downs to onclick functionality.

I've put together an example of the code below here: JSFIDDLE

    $('').children('.menu-item-has-children').click(function(){         $(this).children('.sub-menu').slideToggle('slow');     }).children('ul').find('.menu-item').click(function (event) { //select all the `.child` elements and stop the propagation of click events on the elements         event.stopPropagation();         return false;     }); 

Oddly, though I can't seem to remove the hover state functionality from the menu. An example of DIVI can be found here: DIVI

Note: You'll need to go to headers in the navigation and choose the dark vertical navigation to replicate my layout.

Thanks in advance for your thoughts!


Category: theme development Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.196 (s). 12 q(s)