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 navbar-right elements position

Home Forums Older releases 1.0.x + Bootstrap addon Bootstrap navbar-right elements position

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2789
    JustinasB
    Participant

    Hi,

    Thanks for great menu. I am using bootstrap add-on and navbar-right class. Everything works fine.
    But first level menu items are LTR not RTL, if I am changing float of menu items (.navbar-nav > li {float: right}), starmenu stops working.

    I checked examples and i see that it is working without bootstrap (with li {float: right}), but with bootstrap something goes wrong.
    You can check bootstrap add-on example, changing float of li elements.

    Any ideas?

    #2791
    admin
    Keymaster

    Ah, yes, there seems to be an issue in “jquery.smartmenus.bootstrap.js” since Bootstrap doesn’t support RTL navbars natively so this has not been a tested case. Anyway, just find the following:

    	// fix collapsible menu detection for Bootstrap 3
    	$.SmartMenus.prototype.isCollapsible = function() {
    		return this.$firstLink.parent().css('float') != 'left';
    	};

    and replace it with the following:

    	// fix collapsible menu detection for Bootstrap 3
    	$.SmartMenus.prototype.isCollapsible = function() {
    		return !/^(left|right)$/.test(this.$firstLink.parent().css('float'));
    	};

    and it should work fine. This will be fixed in the next release.

    Please let me know if you still have any troubles.

    Cheers!

    #2812
    JustinasB
    Participant

    Thanks a lot. It worked perfectly.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘1.0.x + Bootstrap addon’ is closed to new topics and replies.