$('body').find('*').each(function(){
var floatElem = $(this);
if(floatElem.css('float') == 'left' || floatElem.css('float') == 'right') {
var floatElemHeight = floatElem.outerHeight();
var floatElemParent = floatElem.parent();
var otherfloatElems = floatElemParent.children().not(floatElem);
var maxHeight = floatElemHeight;
if(otherfloatElems != undefined){
otherfloatElems.each(function(){
var otherfloatElemHeight = $(this).outerHeight();
if(otherfloatElemHeight > maxHeight){
maxHeight = otherfloatElemHeight;
}
floatElemParent.height(maxHeight);
})
}
}
});
$(document).each(function(){
if($(this).css('float') == 'left' || $(this).css('float') == 'left') {
...
}
});
const getMaxNumber = (numbers) => numbers.reduce( (a, b) => (a > b) ? a : b)