Reply To: Hiding the dropdown menu at the desktop level only

Home Forums Older releases 1.0.x + Bootstrap addon Hiding the dropdown menu at the desktop level only Reply To: Hiding the dropdown menu at the desktop level only

#2705
admin
Keymaster

Yes, you can do it like this:

$(function() {
	// disable the sub menus in desktop mode
	$('#main-menu').bind('activate.smapi', function(e, item) {
		// only for the li#menu-item-164 item
		if ($(item).parent().is('#menu-item-164')) {
			if (!$(this).data('smartmenus').isCollapsible()) {
				return false;
			}
		}
	});
});

The activate.smapi event is always triggered on the root UL and the item parameter is the menu item’s link (the <a> element).

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?