Created
January 7, 2014 02:44
-
-
Save wangwen1220/8293899 to your computer and use it in GitHub Desktop.
JS: jQuery 实现的元素高度保持一致 | div maxheight
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
var maxHeight = 0; | |
$("div").each(function() { | |
if ($(this).height() > maxHeight) maxHeight = $(this).height(); | |
}); | |
$("div").height(maxHeight); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment