Set Equal Column Heights


/ Published in: jQuery
Save to your folder(s)

Simple way to create equal height columns/divs


Copy this code and paste it in your HTML
  1. $.fn.setAllToMaxHeight = function(){
  2. return this.height( Math.max.apply(this, $.map( this , function(e){ return $(e).height() }) ) );
  3. }
  4.  
  5. // usage: $('div.unevenheights').setAllToMaxHeight()

URL: http://www.broken-links.com/2009/01/20/very-quick-equal-height-columns-in-jquery/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.