Created
February 10, 2012 09:28
-
-
Save tvandervossen/1788012 to your computer and use it in GitHub Desktop.
jQuery / Zepto highest() plugin
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($){ | |
$.fn.highest = function() { | |
var height, highest = 0; | |
this.each(function() { | |
height = $(this).height(); | |
if (height > highest) highest = height; | |
}); | |
return highest; | |
}; | |
})(window.Zepto || window.jQuery); | |
console.log($('#classification ul').highest()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment