Share Posted January 14, 2020 Let's say I have this animation: tl.to('.video-react-video', {left: '-=325px', duration: 1, ease: "back.out(2.5)"}, 9); How can I replace left: '-=325px' with left: '-=someVar' I tried creating a variable as const someVar = '325px'; and then use it as tl.to('.video-react-video', {left: '-=someVar', duration: 1, ease: "back.out(2.5)"}, 9); but it doesn't work. What would be the right syntax? Link to post Share on other sites
Share Posted January 14, 2020 Hi @Gilbert, For a dynamic value you’ll want to do something like Quote left: “-=“+someVar, 2 Link to post Share on other sites
Author Share Posted January 14, 2020 hi @Shaun Gorneau, Thanks a lot. That works Link to post Share on other sites