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.

Reply To: Bootstrap addon carets dissapear when i center nav

Home Forums Older releases 1.0.x + Bootstrap addon Bootstrap addon carets dissapear when i center nav Reply To: Bootstrap addon carets dissapear when i center nav

#3357
admin
Keymaster

@noobiemania The problem happens when float: none; is applied for the .navbar-nav > li elements – it breaks the following method in “jquery.smartmenus.bootstrap.js”:

// custom "isCollapsible" method for Bootstrap
obj.isCollapsible = function() {
	return !/^(left|right)$/.test(this.$firstLink.parent().css('float'));
};

So if you are using something like this to center the items:

@media (min-width: 768px) {
  .navbar-nav {
    width: 100%;
    text-align: center;
  }
  .navbar-nav > li {
    float: none;
    display: inline-block;
  }
}

to avoid the issue you will need to change the method in “jquery.smartmenus.bootstrap.js” to something like this:

// custom "isCollapsible" method for Bootstrap
obj.isCollapsible = function() {
	return this.$firstLink.parent().css('display') == 'block';
};