Skip to content

Instantly share code, notes, and snippets.

@ayarse
Created May 26, 2015 20:44
Show Gist options
  • Save ayarse/617ecbe00533b3895e42 to your computer and use it in GitHub Desktop.
Save ayarse/617ecbe00533b3895e42 to your computer and use it in GitHub Desktop.
Give the height of first div to all consecutive divs in an element that has class .equalize-by-first
$(window).load( function() {
$('.equalize-by-first > div').height(function() {
if( $(this).index() !== 0 ) {
var zHeight = $('.equalize-by-first > div:first-child').outerHeight();
return zHeight;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment