Equall Column Height using script
$(document).ready(function () {
setHeight('.col1, .col2, .col3');
});
var maxHeight = 0;
function setHeight(column) {
//Get all the element with class = col
column = $(column);
//Loop all the column
column.each(function () {
//Store the highest value
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();;
}
});
//Set the height
column.height(maxHeight);
}
</code>
<h2><a href="http://jsfiddle.net/rajeshkhatri13/APJ3e/" target="blank">http://jsfiddle.net/rajeshkhatri13/APJ3e/</a>
Written by Rajesh Khatri
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Jquery
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#