Animating multiple elements using gsap
Hey all!
I am trying to animate the rotation of an element based on the scroll direction using gsap. While it works, it only works for the first element, and not the other instances. What are some changes I can make to fix it? Thank you in advance!
1 Reply
well, you are only selecting 1 element (logo)
If you want to select more, use
document.querySelectorAll()
(with a class selector)
Inside a foreach loop you can add the gsap animation to each one of them
(im not really familiar with gsap, so there might be other approaches as well)