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.

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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1389
    dinhphan
    Participant

    I use bootstrap drop-down menu. When I have long drop-down sub menu is the same as example in http://vadikom.github.io/smartmenus/src/demo/bootstrap-navbar-fixed-top.html. I don’t want position ‘long sub-menu’ at top of screen when menu scroll. I want this menu position is unchanged. How I can do it?

    #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')
    		})
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘0.9.x’ is closed to new topics and replies.