Re: Prevent menu from expanding on hover?

Home Forums Older releases 0.9.x Prevent menu from expanding on hover? Re: Prevent menu from expanding on hover?


You can try using the showOnClick option. To do so you will need to edit the “jquery.smartmenus.bootstrap.js” file and pass the option in the SmartMenus init call here:


		// these are some good default options that should work for all
		// you can, of course, tweak these as you like
		subMenusSubOffsetX: 2,
		subMenusSubOffsetY: -6,
		subIndicatorsPos: 'append',
		subIndicatorsText: '...',
		collapsibleShowFunction: null,
		collapsibleHideFunction: null,
		rightToLeftSubMenus: $this.hasClass('navbar-right'),
		bottomToTopSubMenus: $this.closest('.navbar').hasClass('navbar-fixed-bottom')

e.g. like this:

		showOnClick: true,

If you are using the minified version you will need to find the right spot to insert the option.

This would make the first level sub menus open onclick. It is similar to how OS menus work but it is not completely the same like the original Bootstrap dropdowns work. Please let me know if this is fine for you.



You will be emailed a link to set your password.


Lost password?