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.

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.