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';
};

Register

You will be emailed a link to set your password.

Login

Lost password?