Created
April 13, 2017 10:21
-
-
Save ejke/807452d777de3194a362a2bb97da648a to your computer and use it in GitHub Desktop.
Equalise li elements
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
//function to equalise li.person elemenets, no matter the content. | |
// Shorthand for $( document ).ready() | |
$(function() { | |
console.log( "ready! and equalise." ); | |
var maxHeight = 0; | |
$("li").each(function(){ | |
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); } | |
}); | |
$("li").height(maxHeight); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment