I currently have the default wordpress menu setup to display sub navigation links on hover, but I am interested in changing it so that the sub navigation only appears when the user clicks on the parent link. You can view my menu here https://jsfiddle.net/foley13/83sk1p1x/
Despite having some javascript code in place to achieve this functionality, it is not working as expected.
$(function(){
//Hide all the sub menus
$('.sub-menu').hide();
$("li:has(ul)").click(function(){
//Locate the child ul and toggle sliding
$(this).children("ul").slideToggle('fast');
$(this).toggleClass("down");
});
});
I suspect that CSS may be interfering with the implementation of this feature, however, I simply want to eliminate the hover effect and solely rely on click events.