I have the following construct in my HTML document:
<div class="content">
<section class="column"></section>
<aside class="column"></aside>
</div>
And I want to match the heights of the section and aside to the height of the tallest of the two. I have the following script, but it’s not working, any ideas:
function unifyHeights()
{
var maxHeight = 0;
$('div.content').children('.column').each(function(){
var height = $(this).outerHeight();
if ( height > maxHeight ) { maxHeight = height; }
});
$('.column').css('height', maxHeight);
}
It looks like nothing was wrong with the function in your question, because both columns get the same height when using this markup and code (taken from your Pastebin example):