Open bashar-lskit opened 1 year ago
yeah! same issue, if i use the same class .counter - it only animates the first elementwith that class.
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); });
This plugin is awesome, but I don't use the counter in multiple times.