Re: Multilevel Menu width

Home Forums Older releases 0.9.x Multilevel Menu width Re: Multilevel Menu width

#1778
admin
Keymaster

Hi, you will need to override the default options which are:

subMenusMinWidth: '10em',	// min-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored
subMenusMaxWidth: '20em',	// max-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored

To do this, you need to edit the following in “jquery.smartmenus.bootstrap.js”:

		$this.addClass('sm').smartmenus({

						// 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')
		})

and pass the subMenusMaxWidth option with a desired value (could be even '' if you don’t want any max-width constraint):

		$this.addClass('sm').smartmenus({

						subMenusMaxWidth: '30em',
						// 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')
		})

Let me know if you still have any troubles.

Register

You will be emailed a link to set your password.

Login

Lost password?