Skip to content

Instantly share code, notes, and snippets.

@elidupuis
Created February 28, 2011 23:07
Show Gist options
  • Save elidupuis/848234 to your computer and use it in GitHub Desktop.
Save elidupuis/848234 to your computer and use it in GitHub Desktop.
Simple plugin to equalize the heights of selected elements
// stolen from http://api.jquery.com/map/
// usage: $('div').equalizeHeights();
$.fn.equalizeHeights = function(){
return this.height( Math.max.apply( this, $(this).map(function(i,e){ return $(e).height() }).get() ) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment