Sub menu doesn't collapse when navigated to a section from it - Mobile view

1 reply · opened May 10, 2016

Aather_parvezMay 10, 2016

http://themes.semicolonweb.com/html/canvas/index-onepage-2.php

If you are on mobile view and navigate to a section from the sub menu, the sub menu wont close after you click a submenu item, it stays open.

When ever you navigate to a sub menu item the expanded sub menu should close down.

SSemicolon WebSTAFFMay 12, 2016

Hello,

This Functionality was not added by default for the Page Sub Menu with One Page Functionality. But this is Definitely Possible. Simply find the following code in the js/functions.js File:

if( windowWidth  0 ) {
		$('#primary-menu > ul.mobile-primary-menu, #primary-menu > div > ul.mobile-primary-menu').toggleClass('show', false);
	} else {
		$('#primary-menu > ul, #primary-menu > div > ul').toggleClass('show', false);
	}
}

and replace it with:

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

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

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