//
HTML
<div class="ym-column">
<div class="ym-col1 equalheight">...</div>
<div class="ym-col2 equalheight">...</div>
<div class="ym-col3 equalheight">...</div>
</div>
// jQuery
$(function() {
equalHeight = function(container){
var currentTallest = 0, rowDivs = new Array(), $el, marginBottom = 0;
$(container).each(function() {
$el = $(this);
$($el).height('auto');
var currentHeight = $el.height();
if (currentHeight > currentTallest)
currentTallest = currentHeight;
rowDivs.push($el);
});
for(currentDiv = 0; currentDiv < rowDivs.length; currentDiv++) {
rowDivs[currentDiv].height(currentTallest + marginBottom);
}
};
function setHeights() {
equalHeight('div.ym-column > div.equalheight');
}
$(window).load(function() {
setHeights();
});
$(window).resize(function(){
setHeights();
});
});