// выше инициализация переменных.
$menuList = $('#menuList').find('.SelectMenu');
if ($menuList.length > 2) {
$menuList.each(function(){
i++;
$temp[i] = $(this);
maxH = ( $(this).height() > maxH ) ? $(this).height() : maxH;
if (i == 2){
console.log(maxH);
$.each($temp, function(id, value){
$(value).height(maxH);
});
$temp = Array();
i = 0;
maxH = 0;
}
});
}
как мне правильно это оформить. Это работает, но чую можно сделать красивее.