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: Smartmenu with Lightbox overlay ?

Home Forums Older releases 1.0.x Smartmenu with Lightbox overlay ? Reply To: Smartmenu with Lightbox overlay ?

#2932
admin
Keymaster

But in general the following should work fine (simplified example):

var $menu = $('#main-menu'),
	$overlay = $('#menu-overlay');
$menu.bind({
	'beforeshow.smapi': function(e, menu) {
		$overlay.show();
	},
	'hide.smapi': function(e, menu) {
		var obj = $(this).data('smartmenus');
		if (obj.visibleSubMenus.length == 0) {
			$overlay.hide();
		}
	}
});