Jump to content
Search Community

Play timeline on templated elements

teekla test
Moderator Tag

Go to solution Solved by Carl,

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

Hi,

Here my problem,
I use a small semantic template engine (transparency) and I can't make my TimelineMax works on elements that being templated.
I guess I done something wrong, but I don't manage to make work my "staggerTo(.MyClass)" that is into my timeline and don't find any fonction to reload the selector or something like that.
I give you a codepen of the problem.
 

If any of you have sugestions :)

Allan

See the Pen myoyMb by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution

Hi and welcome to the GreenSock forums.

 

The API does not support dynamically updating / reloading the target(s) of a tween.

 

The best solutions I can think of at the moment are to

 

  1. rebuild the timeline when you know a new DOM element is created
  2. create a single tween for the new DOM element and insert it into the timeline where it should go, do not try to modify an existing staggerTo().
  • Like 2
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...