简单的jquery的计时器setTimeout 的添加,请写下详细代码,谢谢

2025-12-05 15:42:01
推荐回答(1个)
回答1:

$(function(){
$('#e3').hover(function(){
//setTimeout(function(){$('#e3').animate({"right":"0"},355)}, 400);
$(this).animate({"right":"0"},355);
},function(){
// $(this).animate({"right":"-85px"},355);
setTimeout(function(){$('#e3').animate({"right":"-85px"},355)}, 400);
});

$('#e4').hover(function(){
$(this).animate({"right":"0"},355);
},function(){
$(this).animate({"right":"-85px"},355);
});
});