Skip to content

Instantly share code, notes, and snippets.

@tillsanders
Created June 11, 2015 12:38
Show Gist options
  • Save tillsanders/cd612b213f74ac7bb94b to your computer and use it in GitHub Desktop.
Save tillsanders/cd612b213f74ac7bb94b to your computer and use it in GitHub Desktop.
Get max height of a jquery collection
// Found at Stackoverflow: http://stackoverflow.com/questions/6060992/element-with-the-max-height-from-a-set-of-elements
// Credits to http://stackoverflow.com/users/139010/matt-ball
var maxHeight = Math.max.apply(null, $("li").map(function ()
{
return $(this).height();
}).get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment