intex
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by intex
-
-
Thanks. I've been looking at this forum for years but never knew how easy it was to add Pens. Since I posted I've worked it out, sort of. I spent far too long trying to add the Timeline to the forEach loop, rather than the toggleMenu function. Also It has struck me I was thread hijacking so started a new one:
-
I want to add a timeline animation to an accordion open click and am relatively happy this Pen works fine. However I can't help but feel how I determine the accordion is opening or closing is hacky. Also I feel I should using this:
var accordion_tl = gsap.timeline({paused:true});And then this where my current timeline is:
gsap.timeline().add(accordion_tl.play());But anything I try doesn't work as I want. The current code does exactly what I want but curious to know if there is a better implementation.
-
This works great for what I want
See the Pen pormXeP by GreenSock (@GreenSock) on CodePen
What I want to do is add a timeline animation when opening an item. So I can fade or slide elements in. This older CodePen illustrates the effect I'm after:
See the Pen YQyQWq by GreenSock (@GreenSock) on CodePen
So far I've failed miserably to get anywhere. Could someone point me in the right direction?
Accordion Flip with Timeline on open
in GSAP
Posted
Wow thanks Rodrigo, that is so much neater than before. I have used fromTo before so should have thought of that. But isFlipping I haven't seen, and can see how useful it is. I did wonder whether storing the animation was correct and tried gsap.timeline().add(textTL.reverse(0)); But obviously I don't want to reverse it, just close the accordion. Anyway you've made everything clear.
Much appreciated!!!