Re: SmartMenus and Drupal Bootstrap theme

Home Forums Older releases 0.9.x SmartMenus and Drupal Bootstrap theme Re: SmartMenus and Drupal Bootstrap theme

#1734
admin
Keymaster

Hi Ben, and sorry for this delay! I was on a summer holiday.

Yep, your observations are correct. When used with the Bootstrap addon the SmartMenus script would emulate Bootstrap’s behavior for collapsible menus – i.e. a tap/click on a parent item can only toggle its sub menu. To restore the default SmartMenus behavior – first click to show the sub menu and second to activate the link – you will need to edit “jquery.smartmenus.bootstrap.js” and delete/comment out the following code:

,
// click the parent item to toggle the sub menus (and reset deeper levels and other branches on click)
'click.smapi': function(e, item) {
	var obj = $(this).data('smartmenus');
	if (obj.isCollapsible()) {
                var $item = $(item),
                	$sub = $item.parent().dataSM('sub');
                if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) {
                	obj.itemActivate($item);
                	obj.menuHide($sub);
                	return false;
                }
	}
}

Let me know if you still have any troubles.

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?