我正在使用 div 类 .item_wrap 的多个实例,当图像类 .item 悬停在上面时,它会改变高度。
目前,以下脚本在鼠标悬停时为 div 类的所有实例设置动画。有没有办法只让当前悬停的 div 动画,而不同时让其余的动画?^^;
$(document).ready(function(){
$(".item").hover(
function(){
$('.item_wrap').animate({duration:'slow', easing:'easeOutBack', height:265 }, 500);
},
function(){
$('.item_wrap').stop().animate({duration:'slow', easing:'easeOutBack', height:200 }, 500);
}
);
});
的HTML:
<div class="item_wrap">
<a href="images/burgundyholographicgoldsequin.jpg" class="item" title="image">
<img src="images/burgundyholographicgoldsequin.jpg" width="250" height="192" /></a>
<div class="item_text">Text here</div>
</div>