Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use this counter in multiple times ? #20

Open
bashar-lskit opened this issue Nov 1, 2022 · 2 comments
Open

How can I use this counter in multiple times ? #20

bashar-lskit opened this issue Nov 1, 2022 · 2 comments

Comments

@bashar-lskit
Copy link

This plugin is awesome, but I don't use the counter in multiple times.

@octipus
Copy link

octipus commented May 14, 2023

yeah! same issue, if i use the same class .counter - it only animates the first elementwith that class.

@ArchimidisM
Copy link

Hello guys you can use the following code to modify the given one. Lets say that the class of the counter element is .animated_number__num

Instead of

const el = document.querySelector( '.animated_number__num' ) IO.observe( el )

Use this:

const elements = document.querySelectorAll('.animated_number__num'); elements.forEach(el => { IO.observe(el); });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants