Skip to content

Instantly share code, notes, and snippets.

@tsevdos
Created January 2, 2012 15:29
Show Gist options
  • Save tsevdos/1551107 to your computer and use it in GitHub Desktop.
Save tsevdos/1551107 to your computer and use it in GitHub Desktop.
jQuery "equal heights" method
$.fn.equalHeights = function() {
var maxHeight = 0;
$(this).each(function(index){
var height = $(this).height();
if (maxHeight < height) {
maxHeight = height
}
});
$(this).height(maxHeight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment