Вычисление математического максимума для ширины и высоты
function getHeight(el) { return Math.max($(el).height(), $(el).outerHeight()); } function getWidth(el) { return Math.max($(el).width(), $(el).outerWidth()); }