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: Bootstrap long sub-menu position not in top of screen when scrolling.

Home Forums Older releases 0.9.x Bootstrap long sub-menu position not in top of screen when scrolling. Re: Bootstrap long sub-menu position not in top of screen when scrolling.

#1731
admin
Keymaster

Sorry for this delay! I was on a vacation.

The only way to achieve this is to completely disable the window size detection feature which means that you won’t be able to scroll such long sub menus at all after that. You can do so by editing “jquery.smartmenus.bootstrap.js” and adding the keepInViewport: false option – e.g.:

	$this.addClass('sm').smartmenus({
			keepInViewport: false,
			// 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')
		})