Reply To: Vertically aligning navigation stops dropdowns working

Home Forums Older releases 1.0.x + Bootstrap addon Vertically aligning navigation stops dropdowns working Reply To: Vertically aligning navigation stops dropdowns working

#3414
admin
Keymaster

That’s because the Bootstrap addon depends on the default Bootstrap’s float: left/right declaration for the LI elements to detect when the menu tree is in collapsible mode. So you will need to modify the following code in “jquery.smartmenus.bootstrap.js”:

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

like this:

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

And also make sure your CSS only affects desktop view:

@media (min-width: 768px) {
	.navbar-default .navbar-nav > li {
		float: none;
		display: table-cell;
		vertical-align: middle;
		text-align: center;
	}
}

Register

You will be emailed a link to set your password.

Login

Lost password?