Skip to content

Instantly share code, notes, and snippets.

@ejke
Created April 13, 2017 10:21
Show Gist options
  • Save ejke/807452d777de3194a362a2bb97da648a to your computer and use it in GitHub Desktop.
Save ejke/807452d777de3194a362a2bb97da648a to your computer and use it in GitHub Desktop.
Equalise li elements
//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