Hi guys, i'm new to GSAP and i'm loving it, it's great. I want to animate rocket to ScrollTop on click and i've managed to do that but if i have more clicks it wont show (trail and smoke), only animates rocket and scroll. I tried with clearProps but no luck. Any ideas? This is my click code.
TweenMax.set('.trail-wrapper', {alpha:0})
TweenMax.set('.cloud', {alpha:0})
var tl = new TimelineMax();
$('.toTop').on('click', function () {
tl.to('.trail-wrapper',1 , { alpha:1 })
.to('.cloud', 1, { alpha: 1 })
.to('.rocket-wrapper', 3, { y: -400, ease: Expo.easeIn })
.to('.cloud', 3, { attr: { cy: 185 }, ease: Expo.easeIn }, "-=3")
.set('.cloud', { clearProps: "all" })
.set('.rocket-wrapper', { y: 450 })
.to('html' , 1, { scrollTop:0 })
.to('.rocket-wrapper', 4, { y: 0, ease: Elastic.easeOut.config(0.5, 0.4) })
.to('.trail-wrapper', 2.5, { scaleX: 0.5, scaleY: 0, alpha: 0, ease: Expo.easeOut }, "-=2.0")
});