Skip to content

Instantly share code, notes, and snippets.

@MichaelMackus
Created April 20, 2017 23:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save MichaelMackus/6497f21c9737bc6c297480be8e000793 to your computer and use it in GitHub Desktop.
function evenRowHeights() {
// count the rows
// requires each column to have the same number of rows as column 1
var rowCount = $('.stat-table .c1 > div').length;
$('.stat-table .c1 > div').height('auto');
for (i=0; i<rowCount; i++) {
rowNum = i+1
var tallest = 0;
$('.stat-table .r' + rowNum).each(function() {
if($(this).height() > tallest) {
tallest = $(this).height() + 40;
}
});
$('.stat-table .r' + rowNum).height(tallest);
$('.stat-table .r' + rowNum + ' .rh').height(tallest);
}
}
evenRowHeights();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment