Good morning,
I'm starting to understand GSAP, and I'm gradually trying to do things.
Except that I'm stuck on one point, which is to reverse the animation after a period of time displayed on the screen.
Currently, it is 15sec.
I found some topics on the forum, but not having really understood, I didn't venture further.
The code may seem messy.
Alert V5 (codepen.io)
function rebond(){
var elastic = new TimelineLite();
elastic.to(".box:nth-of-type(1)", 2, {x:530, ease:Elastic.easeOut.config(1, 0.3)}, 0)
.to(".box:nth-of-type(2)", 2.1, {x:530, ease:Elastic.easeOut.config(1, 0.31)}, 0)
.to(".box:nth-of-type(3)", 2.2, {x:530, ease:Elastic.easeOut.config(1, 0.32)}, 0)
.to(".name_pseudo", 1, {x:1690, ease:Elastic.easeOut.config(1, 0.9)}, 0)
}
setTimeout(rebond, 1000);