Skip to content

Instantly share code, notes, and snippets.

@varemenos
Created January 28, 2012 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varemenos/1692147 to your computer and use it in GitHub Desktop.
Save varemenos/1692147 to your computer and use it in GitHub Desktop.
jQuery - calculate max widget height
function maxHeight(selected){
var current = 0, max = 0;
$(selected).each(function(){
current = $(this).height();
max = Math.max(current, max);
});
$(selected).height(max);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment