http://www.tigerstudiodesign.com/blog/
sometimes the match height isn’t fast enough, especially when you click a link to go to another page. the heights wont match each other unless I refresh.
code I use to match heights:
function matchColHeights(col1, col2) {
$('img').load(function() { //let images load before I get the height, else height is calculated based on text alone
var col1Height = $(col1).height();
//alert('col1: '+col1Height);
var col2Height = $(col2).height();
//alert('col2: '+col2Height);
if (col1Height < col2Height) {
$(col1).height(col2Height);
} else {
$(col2).height(col1Height);
}
});
}
$(document).ready(function() {
matchColHeights('#leftPanel', '#rightPanel');
});
any ideas?
I’ve used this plugin before for matching height on columns quickly. http://www.cssnewbie.com/equalheights-jquery-plugin/