Jump to content

callback function allowed inside TL Max

Recommended Posts

Hi all,


Can you use use onComplete() method within TL max timeline or just in the creation of the TL object i.e, var tl = new TimelineMax({})  ?


       tl.to($var 3, {bottom:-50})
     .to($var1, 1.5, {right:300, ease:Elastic.easeOut, onComplete:complete});





Share this post

Link to post
Share on other sites

Hi nickLoffer :)


Welcome to the GreenSock forums.


You can use onComplete for the timeline and/or the tweens. Here's a simple example:


See the Pen VjvxzP by PointC (@PointC) on CodePen


Happy tweening.


  • Like 2

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.