Answer the question
In order to leave comments, you need to log in
How to close the modal menu when clicking on an anchor?
Hello everyone, the problem is the following: on the mobile version of the menu in the form of a modal window, when you click on the menu, the active class is hung up, but when you click on the category (anchor), the menu does not close.
function initMenu()
{
if($('.menu').length)
{
var menu = $('.menu');
hamburger.on('click', function()
{
hamburger.toggleClass('active');
menu.toggleClass('active');
});
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question