jquery – Equal Height Columns

Using jQuery, you can easily equalize the heights of any group of elements.  Below code will equalize all div height which has class= eqheight

Code:

<script type=”text/javascript”>

$(function() {
var maxHeight = 0;
$(‘div.eqheight’).each(function(){
if (maxHeight < $(this).height()) {maxHeight = $(this).height()}
});
$(‘div.eqheight’).each(function(){
$(this).height(maxHeight);
});
});

Share this nice post:

One thought on “jquery – Equal Height Columns

Leave a Reply

Your email address will not be published. Required fields are marked *