有 bc_card 类的卡片。将鼠标悬停在卡片上时,您需要计算除光标所在卡片之外的所有卡片的高度。这是行不通的。
$('.bc_card').on('mouseover', function() {
innerWrappHeightArr = [];
$(".bc_card").each(function() {
if( !$(this).not() ) { // наверное это условие не правильное
innerWrapp = $(this).find(".inner_content");
innerWrappHeight = $(this).height();
innerWrappHeightArr.push(innerWrappHeight);
}
});
maxHeight = Math.max.apply(null, innerWrappHeightArr);
$(".bc_card").css({
"height" : maxHeight + "px"
});
});
怎么做?
做成这样