How can I add two CSS heights of different divs and make that the height to another div with jquery
- by NW Tech
I have three divs, 1 floated left and the other two floated right (they're stacked).
I'm trying to combine the height of the two on the right and apply that height to the one on the left.
This is what I have, with no luck
$(window).bind("load", function() {
var slw = $('div.2').height();
var lw = $('div.3').height();
var result = slw += lw;
$('div.1').css({
'height': result + 'px'
});
});
TIA