Hi, I want to match height of parent with the total height of its children, so that it's content does not flow out of its border. I'm trying following code :
$("#leftcolumn").each(function(){
totalHeight=totalHeight+$(this).height();
});
Will it iterate through all the children of div ? Sometimes, it works sometime don't. Also, I tried following assuming that it will consider all its children, but the result is strange and it gives height double of the original.
$("#leftcolumn > *").each(function(){
totalHeight=totalHeight+$(this).height();
});
Thanks in advance