Jump to content
Search Community

Ununderstandable "uncaught exception: Cannot tween a null target."

shared test
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



DOM elements are loaded with twig (on symfony 3)

tl = new TimelineLite();
    .to(A_shape_intro, 2, {opacity:1, scale:1, ease:Expo.easeOut})
    .add(runTimelineAnimSVG(arrayAnim, runingPattern))
    .staggerFrom($("#logo svg"), 1, {opacity:0, top:-30}, 0.1);

.to is executed well,

.add and the function runTimeLineAnimSVG is executed well

.staggerFrom is not working


I got the error : uncaught exception: Cannot add undefined into the timeline; it is not a tween, timeline, function, or string and .staggerFrom is not triggered


What's the problem ?




Link to comment
Share on other sites

Hi @shared :)


Welcome to the forum. 


Your function is firing immediately. You can add() a function to the timeline, but it doesn't take parameters. Please try call() like this:


.call(runTimelineAnimSVG, [arrayAnim, runingPattern])


Here's some more info about call()



Hopefully that helps. Happy tweening.


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