On a recent website project I was working on, I encountered an issue with the .toggle function for the menu. The functionality is not behaving as expected and seems to be stuck.
I created a fiddle of the complete menu here
jQuery(document).ready(function() {
jQuery('.menuD').click(function(e) {
jQuery(this).toggleClass('active');
jQuery('.mennu').toggleClass('active');
e.preventDefault();
});
});
(This is my first time using fiddle so I hope I've entered everything correctly, without including the "head" section.)
I am struggling to understand why the toggle function is not working properly, especially since I implemented a similar solution successfully on my own page last year. Since Javascript is not my strongest language, any assistance in identifying the problem would be greatly appreciated.