primary-menu-trigger animation wrong

3 replies · opened Sep 15, 2020

Aamadeus77Sep 15, 2020

triggering (opening) the menu works by clicking the burger (svg-trigger) ... also the animation works
After opening when closing the menu by clicking the X also works!
But after opening when clicking on an empty area (instead on the X) the menu closes but the svg stays in "X"-mode and not rteurning to the burger icon

see example in my next answering post

SSemicolon WebSTAFFSep 16, 2020

Hello,

Thanks for reporting this. This appears to be a Bug. Please find the following code in the js/functions.js File inside the miscFunctions: function() Function Block:
[ch_pre]if (!$(event.target).closest('.primary-menu.mobile-menu-off-canvas .menu-container').length) {
primaryMenu.filter('.mobile-menu-off-canvas').find('.menu-container').toggleClass('d-block', false);
$body.toggleClass("primary-menu-open", false);
}[/ch_pre]

and replace it with:
[ch_pre]if( primaryMenu.hasClass('mobile-menu-off-canvas') ) {
if (!$(event.target).closest('.primary-menu.mobile-menu-off-canvas .menu-container').length) {
primaryMenu.filter('.mobile-menu-off-canvas').find('.menu-container').toggleClass('d-block', false);
$body.toggleClass("primary-menu-open", false);
}
}[/ch_pre]

This will definitely fix the issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Aamadeus77Sep 16, 2020

This works!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard