Jump to content
Search Community

addEventListener works only on first click

girro test
Moderator Tag

Recommended Posts

Hi @girro :)

 

Welcome to the forum.

 

It doesn't work on the second click because you've already played the timeline. You'll want to restart the timeline or use .play(0) like this:

document.getElementById("List").addEventListener("click", () => tl.play(0));
document.getElementById("Kanban").addEventListener("click", () => t2.play(0));

Is this intended to be a bubble indicator when you're done? If so, this demo may help.

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

 

Happy tweening and welcome aboard.

:)

 

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