Off canvas navigation toggle on one pager

Hi Support,

We’re creating a simple one page design website with a off-site canvas menu toggle.
When clicking a link mobile, the site scrolls as expected but the menu wil not collapse back. Is there some additional jQuery we can use to make this happen?

Example:
klant7.newfishdev.nl
(small screen or mobile only, desktop is fine)

Hello There,

Thanks for writing in! I can confirm the issue that it does not work in mobile. You can click the toggle button but nothing will happen. Would you mind providing us the url of your site with login credentials so we can take a closer look?

To do this, you can create a secure note with the following info:
– Link to your site
– WordPress Admin username / password
​
Thank you.

Hi There,

Please add the following code under Customizer > Custom > Global Javascript:

jQuery(document).ready(function($) {
	$('.hm6.x-menu > li > .x-anchor').on('click touchend', function() {
		$("button.x-off-canvas-close").trigger('click');
	});
});
1 Like

Works, Thanks!

You’re most welcome!

…it was helpful for me too, today! Thanks for this!!

Cy.

1 Like