Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
jamaldols

Transition between pages only works the first time

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks for the information SHRUG, I'll take a look at the other thread! 

 

Share this post


Link to post
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.

×