Last active
December 12, 2015 12:49
-
-
Save jmsmrgn/4774687 to your computer and use it in GitHub Desktop.
jQuery - fluid equal height columns on window resize
This file contains hidden or 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
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