Jump to content


on compete of staggerTo

Recommended Posts

I have a text animation that shows one word at a time. Is there a way I can fire a function at the end of each staggerTo (i.e each paragraph?)


This is what I have: 


tl.staggerTo(mySplitText.words, speed, {display:'block',repeat:1,yoyo:true}, speed*2,endOf)

function endOf() {
  console.log ('end of paragraph')


See the Pen wrXwra by garethj (@garethj) on CodePen

Link to comment
Share on other sites

amazing, thank you both. I have made a small update to yours @Carl so we do not need jquery. 


See the Pen YrOWOK by garethj (@garethj) on CodePen


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