我不能给工作鼠标悬停。
我想在某个位置移动一个 div,并通过鼠标悬停、鼠标单击和拖放进行一些 div 交互。但是,我被阻止了,因为第一步,鼠标悬停,不喜欢工作。那是代码:
(function($) {
$(document).ready(function() {
$("#dxani").mouseover(function() { $("#dxani").css("background-image", "url(img/sprite/fr1.png)") });
$('#dxani').sprite({fps: 3, no_of_frames: 4})
$("#dxani").animate({marginLeft: "+=200px", }, 20000 );
setTimeout(function() {$("#dxani").css("background-image", "url(img/sprite/sprite1sx.png)")} , 20000 );
$("#dxani").animate({marginLeft: "-=200px", }, 20000 );
setTimeout(function() {$("#dxani").css("background-image", "url(img/sprite/sprite1dx.png)")} , 40000 );
$("#dxani").animate({marginLeft: "+=400px", }, 40000 );
setTimeout(function() {$("#dxani").css("background-image", "url(img/sprite/sprite1sx.png)")} , 80000 );
$("#dxani").animate({marginLeft: "-=400px", }, 40000 );
setTimeout(function() {$("#dxani").css("background-image", "url(img/sprite/sprite1dx.png)")} , 120000 );
$("#dxani").animate({marginLeft: "+=800px", }, 80000 );
setTimeout(function() {$("#dxani").css("background-image", "url(img/sprite/sprite1dx.png)")} , 200000 );
$("#dxani").animate({marginLeft: "-=800px", }, 200000 );
});
})(jQuery);