У меня есть метод небольшого наведения, который увеличивает высоту изображения.Проблема в том, что animate автоматически меняет изображение с display: block на display: inline.Как я могу сказать jQuery не менять это при анимации?
phoneCarousel.find("li td.img img").each(function(){
$(this).data('height', this.height);
});
// Add mouse methods to each phone
phoneCarousel.find("li").bind('mouseenter mouseleave', function(e) {
var img = $(this).find("td.img img");
phoneCarousel.find("li").removeClass("active");
$(this).addClass("active");
if(img.data('height')>0){
img.stop().animate({
height: img.data('height') * (e.type === 'mouseenter' ? 1.2 : 1)
});
}
});