Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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