Skip to content

Instantly share code, notes, and snippets.

@isaacdanielanderson
Created October 10, 2018 16:10
Show Gist options
  • Save isaacdanielanderson/909419c3e7d0add8641da93ebf33b643 to your computer and use it in GitHub Desktop.
Save isaacdanielanderson/909419c3e7d0add8641da93ebf33b643 to your computer and use it in GitHub Desktop.
Equalize col heights using JS
// Equalize column heights on BS3 version using JS
// https://stackoverflow.com/questions/23287206/same-height-column-bootstrap-3-row-responsive
// EXAMPLE:
// Equalize heights on BS4 cards
$( document ).ready(function() {
var heights = $(".card").map(function() {
return $(this).height();
}).get(),
maxHeight = Math.max.apply(null, heights);
$(".card").height(maxHeight);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment