thednp / jQueryTween:我想知道是否有类似onComplete事件?

时间:2015-07-04 15:40:36

标签: jquery plugins

https://github.com/thednp/jQueryTween
我正在使用这个JQuery插件,我现在坚持找到像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

2 个答案:

答案 0 :(得分: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")
    }
);

答案 1 :(得分:0)

我刚从github中删除了KUTE.js的jQuery存储库。

查看https://github.com/thednp/kute.js

演示,文档和&这里的示例http://thednp.github.io/kute.js