これは構造です:
<div class="features-image">
</div>
<div class="features-image">
</div>
<div class="features-image">
</div>
機能画像がホバー状態にある場合に何かが起こるjQuery関数を作成しました。
私の問題は、3 つの主な画像があり、マウスが 1 番目の主な画像、2 番目と 3 番目の画像にカーソルを合わせた結果、同じ効果が得られることです。
1番目の機能画像がホバー状態の場合、2番目と3番目の画像が1番目の画像の効果をコピーしないようにします。
コード:
jQuery(document).ready(function() {
jQuery('.features-image').hover(function(){
jQuery(this).animate({
top:'95px',
height:'135px'
},500);
},function(){
jQuery('.features-content').animate({
top:'170px',
height:'60px'
},500);
});
});