Last active
August 29, 2015 14:05
-
-
Save willybahuaud/bf9eaa16b5c9d8066ea6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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