Skip to content

Instantly share code, notes, and snippets.

@jmsmrgn
Last active December 12, 2015 12:49
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 jmsmrgn/4774687 to your computer and use it in GitHub Desktop.
Save jmsmrgn/4774687 to your computer and use it in GitHub Desktop.
jQuery - fluid equal height columns on window resize
function resetHeight() {
var maxHeight = 0;
$(".equal-height").height("auto").each(function(){
maxHeight = $(this).height() > maxHeight ? $(this).height() : maxHeight;
}).height(maxHeight);
}
if (window.innerWidth > 650) {
resetHeight();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment