Skip to content

Instantly share code, notes, and snippets.

@wangwen1220
Created January 7, 2014 02:44
Show Gist options
  • Save wangwen1220/8293899 to your computer and use it in GitHub Desktop.
Save wangwen1220/8293899 to your computer and use it in GitHub Desktop.
JS: jQuery 实现的元素高度保持一致 | div maxheight
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