Created
April 20, 2017 23:02
-
-
Save MichaelMackus/6497f21c9737bc6c297480be8e000793 to your computer and use it in GitHub Desktop.
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 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