Skip to content

Instantly share code, notes, and snippets.

/*
* Equalise the height of boxes (uses min-height).
*/
jQuery.fn.balanceHeights = function() {
// Get max height from list then apply to all.
var heights = [];
this.each( function () {
heights.push(jQuery(this).outerHeight());
});
return this.css('min-height', Math.max.apply({}, heights));