Jump to content


Noob Question: Affecting Multiple Objects Simultaneously on Single EventListener

Go to solution Solved by Carl,

Recommended Posts

As per the title, I'm trying to affect animations on two objects per one EventListener().

It's kind of working, but not as intended. The effect I'm looking for is to have each of the digit labels fire independently in correlation to their respective button. At this moment, they are firing in unison, which is not what I want.

I was wondering if one of you seasoned pros would be able to tell me what I'm doing wrong.

Thanks in advance.

Kind regards,

See the Pen gOzemGJ by scottonanski (@scottonanski) on CodePen

Link to comment
Share on other sites

  • Solution

that's a pretty cool effect. thanks for the demo.

Inside the first loop you have access to the index of the text button so you can use that to target its respective digit.


See the Pen MWGVmqq?editors=1010 by snorkltv (@snorkltv) on CodePen

  • Like 2
  • Thanks 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.