$(document).ready(function(){ resizeblocks(); $(window).resize(resizeblocks); function eqHeight(item) { var maxHeight = 0; $(item).each(function(){ var abs_child = $(this).find('.bottomContent').outerHeight(); $(this).css('height', 'auto'); if($(this).outerHeight() + abs_child > maxHeight) maxHeight = $(this).outerHeight() + abs_child; }); $(item).css('height', maxHeight); } function resizeblocks() { setTimeout(function(){ eqHeight('.oferta'); }, 200); } });