Submenu doesn't want to collapse

4 replies · opened Mar 17, 2020

TtutkubakayMar 17, 2020

Please click to Website and as sub menu click to Website Op Maat. After click, sub menu keeps active. I have tried many tutorials but i can't let him close automatically after clicking on it.

This is the site: gentwebdesign.com

TtutkubakayMar 17, 2020

As you see the picture in attachment, i click to submenu link, my page scrolls down to that section but submenu is not closing. I have to move my mouse to away, so its gone. I have read lot of guides to let him close automatically after click but none of them fixed my problem.

SSemicolon WebSTAFFMar 17, 2020

Hello,

This is unfortunately, not a function that is included with the Default Functions that comes with the Package, so the support will be limited on this and you will need to make customizations to the codes according to your requirements manually.

You can consider finding the following code in the js/functions.js File inside the onePageScroll: function() Function Block:


if( windowWidth  0 ) {
		$('#primary-menu > ul.mobile-primary-menu, #primary-menu > div > ul.mobile-primary-menu').toggleClass('d-block', false);
	} else {
		$('#primary-menu > ul, #primary-menu > div > ul').toggleClass('d-block', false);
	}
	$pagemenu.toggleClass('pagemenu-active', false);
	$body.toggleClass('primary-menu-open', false);
}

and replace it with the following code:


if( windowWidth  0 ) {
		$('#primary-menu > ul.mobile-primary-menu, #primary-menu > div > ul.mobile-primary-menu').toggleClass('d-block', false);
	} else {
		$('#primary-menu > ul, #primary-menu > div > ul').toggleClass('d-block', false);
	}
	$pagemenu.toggleClass('pagemenu-active', false);
	$body.toggleClass('primary-menu-open', false);
} else {
	$('#primary-menu:not(.on-click) > ul, #primary-menu:not(.on-click) > div > ul:not(.dropdown-menu)').superfish('hide');
}

Hope this Helps!

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

TtutkubakayMar 22, 2020

**It worked! **

Thank you so much Canvas <3

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