Skip to content

Instantly share code, notes, and snippets.

@mattbrett
Created June 7, 2013 20:59
Show Gist options
  • Save mattbrett/5732385 to your computer and use it in GitHub Desktop.
Save mattbrett/5732385 to your computer and use it in GitHub Desktop.
jQuery: Make all child containers equal height.
jQuery(document).ready(function($) {
$('.container').each(function() {
var highestBox = 0;
$('.post', this).each(function() {
if ($(this).height() > highestBox) {
highestBox = $(this).height();
}
});
$('.post', this).height(highestBox);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment