我試圖在鼠標懸停時將圖像製作爲動畫,並在鼠標離開時將其恢復到原始位置,圖像會生成動畫但鼠標離開之前。使用jquery將動畫圖像恢復到原始位置
這裏是我的代碼
$(document).ready(function(){
$('.logo').mouseenter(function(){
$('.logo').animate({left: "100px"});
});
$('.logo').mouseout(function(){
$('.logo').animate({right: "100px"});
});
});
謝謝,實際上剛開始學習jquery。只是嘗試不同的事情。 – Faiz