Created
June 11, 2015 12:38
-
-
Save tillsanders/cd612b213f74ac7bb94b to your computer and use it in GitHub Desktop.
Get max height of a jquery collection
This file contains hidden or 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
// 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