Skip to content

Instantly share code, notes, and snippets.

@willybahuaud
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willybahuaud/bf9eaa16b5c9d8066ea6 to your computer and use it in GitHub Desktop.
Save willybahuaud/bf9eaa16b5c9d8066ea6 to your computer and use it in GitHub Desktop.
jQuery( document ).ready( function( $ ) {
function resizeCallback() {
var size = 0;
$blocs = $( '.same-size' )
$blocs.css( 'height', 'auto' );
$blocs.each( function() {
size = $( this ).innerHeight() > size ? $( this ).innerHeight() : size;
} );
$blocs.css( 'height', size );
}
resizeCallback();
$(window).on( 'resize', function() {
resizeCallback();
} );
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment