Jump to content
Search Community

Transition between pages only works the first time

jamaldols test
Moderator Tag

Recommended Posts

Hey, I'm pretty new at this GSAP thing. I've never made a transition between pages so I don't know the best way to do it. 

In my animation everything works fine the first time, but from then on it doesn't work the same. 

I know I should reset the animation to its initial state, but I don't even know where to start.

Thanks in advance

 

https://codepen.io/JamalDols/project/editor/AOmBar

See the Pen AOmBar by JamalDols (@JamalDols) on CodePen

Link to comment
Share on other sites

Hi @jamaldols welcome to the GreenSock forums.

 

This seems more like a Barba related question than GSAP. But have a look at this recent post and the linked CodePen project using GSAP 3 & Barba 2.

 

https://greensock.com/forums/topic/22035-page-transition-with-gsap-and-barbajs/?do=findComment&comment=110399

 

Fork that and try building your desired result based upon that example, utilizing its a approach of leaveAnimation & enterAnimation to build your concept. Also you shouldn't need that helper.js delay function with the above approach.

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...