Skip to content

Instantly share code, notes, and snippets.

@Takaya213
Created July 5, 2013 08:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Takaya213/5932980 to your computer and use it in GitHub Desktop.
Save Takaya213/5932980 to your computer and use it in GitHub Desktop.
Make elements have the same height.
$.fn.equalizeHeights = function() {
var maxHeight = this.map(function(i,e) {
return $(e).height();
}).get();
return this.height( Math.max.apply(this, maxHeight) );
};
$('.equal').equalizeHeights();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment