Skip to content

Instantly share code, notes, and snippets.

@bpierre
Created July 1, 2010 16:22
Show Gist options
  • Select an option

  • Save bpierre/460194 to your computer and use it in GitHub Desktop.

Select an option

Save bpierre/460194 to your computer and use it in GitHub Desktop.
jQuery Equalize Height
/*
* jQuery Equalize Height 0.2
* Copyright (c) 2012 Simon Ertel (simonertel.net)
* Licensed under the MIT LICENSE
*/
(function($){
$.fn.equalizeHeight = function(){
var heights = [];
return this.each(function(i){
heights.push($(this).height());
}).height(Math.max.apply(Math, heights));
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment