2011-12-25 10 views
0

メリークリスマス!私はこのスクリプトを持っている:jQueryハイライトsettimeout

function nudge(){ 
$("#info").animate({left:"+=5px"},40).animate({top:"+=5px"},40).animate({top:"-=10px"},40).animate({left:"-=10px"},40) 
    .animate({top:"+=5px"},40).animate({left:"+=5px"},40) 
    .animate({left:"+=5px"},40).animate({top:"+=5px"},40).animate({top:"-=10px"},40).animate({left:"-=10px"},40) 
    .animate({top:"+=5px"},40).animate({left:"+=5px"},40) 
    setTimeout(function(){ 
     $("#info").effect("highlight", {}, 3000); 
    }, 1000); 

}

私はアニメーションの後、のdiv Goが強調され、今、私はそれが右ハイライト効果のセットではないと思いたいです。

ありがとうございます!

答えて

0
function nudge(){ 
$("#info").animate({left:"+=5px"},40).animate({top:"+=5px"},40).animate({top:"-=10px"},40).animate({left:"-=10px"},40) 
    .animate({top:"+=5px"},40).animate({left:"+=5px"},40) 
    .animate({left:"+=5px"},40).animate({top:"+=5px"},40).animate({top:"-=10px"},40).animate({left:"-=10px"},40) 
    .animate({top:"+=5px"},40).animate({left:"+=5px"},40) 
     .delay(1000) // same as setTimeout 1000 
     .animate({top:"+=5px"}, 0, function(){ // dummy animate for callback 
      $("#info").effect("highlight", {}, 3000); 
     }); 
} 
関連する問題