Hi Using TimelineMax.staggerTo I would like to calculate the x position of where a box would end up at runtime. So:
var i = 0;
var tlmx = new TimelineMax();
tlmx.staggerTo( $('.box-answer'), 0.25, { x:getXposition(), y:200 }, 0.25 );
function getXposition() {
console.log('getXposition: i:', i);
var posX = i * 200;
i++;
return posX;
}
With the code above the function only gets called once. I thought it would be called with each iteration of $('.box-answer'). Help greatly appreciated. Thanks