How to tween an integer variable using Greensock:TweenMax,TweenLite in javascript?
var counter = { var: 0 };
TweenMax.to(counter, 5, {
var: 100,
onUpdate: function () {
console.log(Math.ceil(counter.var));
},
ease:Circ.easeOut
});
it starts from 0 to 100 in 5 seconds.