I'm using jQuery to make list items equal height (find the tallest, and make all list items equal to that).
But the code doesn't recognize any of the content within each column to set the height. It only recognizes an 8px border-top I have, and sets the height of each column to 8px. I need the code to recognize the content within the column (some h tags and p tags), find the tallest column, and make all columns equal to that.
$('#secondary').each(function(){
var highestBox = 0;
$('.degreeCardInner', this).each(function(){
if($(this).height() > highestBox)
highestBox = $(this).height();
});
$('.degreeCardInner',this).height(highestBox);
});
See this example: JSFiddle
Click on a degree category to get to the screen I'm talking about. I'm trying to get each #degreeCardInner to register with a height that takes into account all the content within.
The code seems to work, but only recognizes the 8px border-top I have on the #degreeCardInner, and not the content within.
Is there something I need to add to the css to make this work?
#secondaryis set todisplay:none;when you are calculating your heights. Look at this Fiddle it calculates heights after#secondaryis shown.