2015-07-04 26 views
1

https://github.com/thednp/jQueryTween
我正在使用這個JQuery插件,我現在一直在尋找像onComplete這樣的事件。任何人都經歷過這個過程?thednp/jQueryTween:我想知道是否有像onComplete事件?

$('#object1').jQueryTween({ 
    from: { 
     translate: { 
      x: 500 
     } 
    }, 
    to: { 
     translate: { 
      y: 0 
     }, 
     rotate: { 
      z: -360 
     } 
    }, 
    duration: 3000, 
    easing: TWEEN.Easing.Exponential.Out 
}).onComplete({ console.log("done") }); //I would like to know how to do something like this 

回答

0

documentationjQueryTween

$('#object1').jQueryTween({ 
    from: { 
     translate: { 
      x: 500 
     } 
    }, 
    to: { 
     translate: { 
      y: 0 
     }, 
     rotate: { 
      z: -360 
     } 
    }, 
    duration: 3000, 
    easing: TWEEN.Easing.Exponential.Out 
    }, 
    // callback when tween is finished 
    function() { 
     // do some cool stuff when tween finished animating 
     console.log("done") 
    } 
); 
相關問題