Created
January 30, 2016 13:22
-
-
Save realguess/f7bdb85810955b155906 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
var biggestHeight = "0"; | |
// Loop through elements children to find & set the biggest height | |
$(".container *").each(function(){ | |
// If this elements height is bigger than the biggestHeight | |
if ($(this).height() > biggestHeight ) { | |
// Set the biggestHeight to this Height | |
biggestHeight = $(this).height(); | |
} | |
}); | |
// Set the container height | |
$(".container").height(biggestHeight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment