Jump to content
GreenSock

gareth

Lifecycle of a timeline in ajax site

Recommended Posts

I have a site with ajax page loads (using highway js). On one of the pages I have a looping timeline tween.

 

Should I try and kill this tween on page exit or is it killed anyway because the elements are removed from the dom? I reinitialise it on each page visit. 

Link to comment
Share on other sites

Hey gareth. You should make sure to kill this timeline if the content has gone away. If you want to kill all of the animations on a page you could use gsap.globalTimeline.clear().

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.
×