Hi again and sorry for the delay! Unfortunately, I wasn’t able to look into this earlier.
You can achieve the exact Bootstrap behavior, for example, like this – first grab a fresh copy of “jquery.smartmenus.bootstrap.js” and then:
1) Activate touch mode even when a mouse is present by adding the following at the end of the file to overwrite the default prototype method:
// activate touch mode permanently
$.SmartMenus.prototype.isTouchMode = function() {
return true;
};
This will make sure items are only activated on click/tap.
2) Change the following:
'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;
}
}
}
like this:
'click.smapi': function(e, item) {
var obj = $(this).data('smartmenus'),
$item = $(item),
$sub = $item.parent().dataSM('sub');
if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) {
obj.itemActivate($item);
obj.menuHide($sub);
return false;
}
}
This will make sure parent items onclick always just toggle their sub menus even on desktop (you cannot activate their links like with Bootstrap’s default navbars).
Please let me know if you this does the trick for you.