I am trying to implement a basic toggle menu after the last has stopped working but no matter how much I try to narrow down the CSS selector, the sub menu items ALWAYS toggle the menu on click for the mobile menu and therefore you cannot click through.
My JS is:
jQuery(document).ready(function() {
jQuery('#menu-item-1837').click(function(e) {
jQuery('#menu-item-1837 > ul').slideToggle(500);
e.preventDefault();
});
});
jQuery(document).ready(function() {
jQuery('#menu-item-1832').click(function(e) {
jQuery('#menu-item-1832 > ul').slideToggle(500);
e.preventDefault();
});
});
I have tried all sorts of variations including targeting using:
#menu-item-1837 a:first-child
.menu-item-has-children > a
a#menu-item-1837
I can't work out why it isn't working
I have also tried variations of targeting the sub-menu but it never works
Any help would be appreciated