Last active
January 11, 2016 17:14
-
-
Save jeffreysfridge/cfd38dfd3ead694ffa9d to your computer and use it in GitHub Desktop.
responsive equal height col
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 equalheight(group) { | |
group = $(group); | |
group.css('height', ''); | |
var tallest = 0; | |
group.each(function() { | |
var thisHeight = $(this).height(); | |
if(thisHeight > tallest) { | |
tallest = thisHeight; | |
} | |
}); | |
if ($(window).width() >= 992) { | |
group.height(tallest); | |
} | |
} | |
$(window).resize(function(){ | |
equalheight('.eqheight'); | |
}); | |
equalheight('.eqheight'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment