Bootstrap 3 - jQuery Equal heights in menu with specific height of container.

voted: 2

This short code added at the bottom of page make all of dropdown menu's elements equal height.

$(document).ready(function() {
			 // navigation equal heighs			 
			 var n = $( ".nav .dropdown" ).length;
			 // 450 (height of container)
			 var menu_elements = 450 / n;
			 var m_n = Math.floor(menu_elements)+ 'px';			 
			 $('.nav .dropdown').css({'height': m_n})		 

working url: not entered
version: not entered
Leave a Comment:
Characters left:
No comments yet.