Skip to content

Instantly share code, notes, and snippets.

@johnantoni
johnantoni / setAllToMaxHeight
Created April 13, 2011 13:01
setAllToMaxHeight (jquery)
$.fn.setAllToMaxHeight = function(){
return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
}
// usage: $(‘div.unevenheights’).setAllToMaxHeight()
// http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/