Last Updated: February 25, 2016
·
511
· rajeshkhatri13

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>