Jump to content
Search Community

[Solved] TimelineMax remove() kills the timeline?

saar62097
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Posted

Hey everybody

 

I am looking into building a complex nested timelines project which I will ask about later, but for starters: why is remove() stopping the master timeline in the Codepen example?

 

thanks in advance,

Sa'ar

See the Pen rZwOoQ by saar62097 (@saar62097) on CodePen.

Posted

Because you're putting everything on the same timeline. Look closely at the names.

 

var box1Timeline = new TimelineMax();
box1Timeline.from("#box1", 1, {y:100},0);

var box2Timeline = new TimelineMax();
box1Timeline.from("#box2", 1, {y:100},1); // box 1 timeline ?

var box3Timeline = new TimelineMax();
box1Timeline.from("#box3", 1, {y:100},2); // box 1 timeline ? 

 

 

Also, you're using an old version of GSAP. In the JavaScript settings in CodePen's editor, search for GSAP.

https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js

 

 

  • Like 4
Posted

OMG so embarrassed...

 

thnx and sorry for the trouble

  • Like 1

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