This will first check the device width before performing Samliew’s code to get around the desktop issue:
<script>
$('.w-nav-menu').on('click', 'a', function() {
// When a nav item is clicked on a tablet or mobile device
if (parseInt($(window).width()) < 990) {
// Click the menu close button
$('.w-nav-button').triggerHandler('tap');
}
});
</script>
Not sure if this is why for you but if you use code to make the nav menu close you can’t see it in effect in preview mode. It only shows once the site is published.
Hi! Thanks to the code posted by @alexdixon I could solve the closing issue of my menu…but I have an issue with this page HowToMoney
Only on this page (project HowToMoney) on mobile I have a problem with the width of the screen as soon as you click on the hamburger menu. On the other 2 pages (2 other projects: Work and St.Pauli Turnverein) this problem does not occur.
can’t believe this is still an issue. and to add code you need paid site. sound sneaky to me. retractable menu should be by default. period. it should also me an option in the style section