Jump to content
Search Community

How to run a function in the middle of a timeline?

xoxoxoxo test
Moderator Tag

Recommended Posts

I'm animating a div in a timeline, however i'd like to perform some action in the middle of it. I tried `onComplete` but looks like that only works when timeline ends.

Ideally, I'd like to add perfromAction on the second timeline when the div's x value reaches to 100%

 

tl
.to(div, 1, { x: 0 })
.to(div, 1, { x: '100%'  })
.to(title, 1, { height: 0,  opacity: 0,  y: -50 }, '<=0.5');
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...