Skip to content

Instantly share code, notes, and snippets.

@niallobrien
Last active August 29, 2015 14:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niallobrien/bd969710f3c35038ff0a to your computer and use it in GitHub Desktop.
Save niallobrien/bd969710f3c35038ff0a to your computer and use it in GitHub Desktop.
Equalizer
function equalizeHeight(watch, target) {
var maxHeight = -1;
$(watch).each(function () {
maxHeight = maxHeight > $(this).outerHeight() ? maxHeight : $(this).outerHeight();
});
$(target).each(function () {
$(this).outerHeight(maxHeight);
});
}
// Example usage
equalizeHeight('.contact-details > li', '.panel');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment