I have a menu in javascript and my knowledge in javascript is almost null. And unfortunately this menu on the mobile it is closing alone ... and as I do not have much knowledge I am suffering to solve this problem.
Here's the mobile site and I'll leave the code below.
Menu closing alone: link
Code:
// Header Menu Mobile Nav
if (jQuery('.menu')) {
jQuery('.nav-toggler').click(function (e) {
e.preventDefault();
jQuery(this).next('.menu').addClass('open');
e.stopPropagation();
});
jQuery('.menu').on('click', function(e) {
e.stopPropagation();
});
jQuery('body').on('click', function (e) {
jQuery('.menu').removeClass('open');
});
jQuery('#closeMenu').click(function (e) {
e.preventDefault();
jQuery('.menu').removeClass('open');
});
}