Jump to content
Search Community

intex

Premium
  • Posts

    4
  • Joined

  • Last visited

Everything posted by intex

  1. 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!!!
  2. 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:
  3. 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.
  4. This works great for what I want https://codepen.io/GreenSock/pen/pormXeP 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: rough accordion (forums) (codepen.io) So far I've failed miserably to get anywhere. Could someone point me in the right direction?
×
×
  • Create New...