Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Reply To: Expand the menu to current site on page load for mobile view only

Home Forums Older releases 1.0.x Expand the menu to current site on page load for mobile view only Reply To: Expand the menu to current site on page load for mobile view only

#2689
admin
Keymaster

Hi, glad you like the script! 🙂

You could use something like this ondomready instead:

var $mainMenu = $('#main-menu'),
	smObj = $mainMenu.data('smartmenus');
if (smObj.isCollapsible()) {
	$mainMenu.smartmenus('itemActivate', $mainMenu.find('a.current').eq(-1));
}

Cheers!