Skip to content

Instantly share code, notes, and snippets.

@jeffreysfridge
Last active January 11, 2016 17:14
Show Gist options
  • Save jeffreysfridge/cfd38dfd3ead694ffa9d to your computer and use it in GitHub Desktop.
Save jeffreysfridge/cfd38dfd3ead694ffa9d to your computer and use it in GitHub Desktop.
responsive equal height col
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