Skip to content

Instantly share code, notes, and snippets.

@tristar500
Created May 28, 2012 16:05
Show Gist options
  • Save tristar500/2819863 to your computer and use it in GitHub Desktop.
Save tristar500/2819863 to your computer and use it in GitHub Desktop.
jQuery to make all column divs within a containing 'group' div the same height
/* Make all column div within 'group' the same height */
/* http://www.cssnewbie.com/equal-height-columns-with-jquery/ */
function equalHeight(group) {
var tallest = 0;
group.each(function() {
var thisHeight = $(this).height();
if(thisHeight > tallest) {
tallest = thisHeight;
}
});
group.height(tallest);
}
equalHeight($(".content"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment