Hi,
I have added the ‘content area off canvas’ element to my menu.
I have anchor links within the off canvas content.
How do I get the off canvas toggle to close when clicking on an anchor link on the same page?
You can see my example here: https://www.brainglish-intlschool.com/unique-programs/
I have an anchor link here: https://www.brainglish-intlschool.com/unique-programs/#english-in-nature/
It will not close the menu when I click it. I have tried this JS and it does not work:
$(’.e3219-4.x-off-canvas .x-off-canvas-content .x-anchor’).on( “click touchstart”, function() {
if ($(this).attr(‘href’).indexOf(’#’) !== -1) {
$(’.x-off-canvas-close’).click();
}
});