I've seen this and this as well, but I just can't get them to work.
I have a main div with many children with different ids and classes inside it. I need to find a way the get the heights of a certain class and set the next divs' heights according to them. I know it's not working but it may help you understand what I would like to achieve:
var placesHeight = 0;
$('.places').each(function(){
if(height > 35 ) {
$(this).next('.nextdiv').css('height','(placesHeight+25)+"px"');
});
EDIT: Thanks for the quick help everyone. I tried all of it and realized all I need is this:
var placesHeight = $('.places').height();
$('.nextdiv').css('height', placesHeight+25);