Jump to content
Search Community

animating textContent no longer works in gsap 3.11

avizmarques test
Moderator Tag

Recommended Posts

I've been animating a counter in this way, but it no longer works after upgrading to gsap 3.11. I don't see anything in the release notes that could cause it, so not sure if it's a bug?

What happens now is that the text is simply replaced by a 0, but it does not increment as before. I tried removing the scrolltrigger, but that does not seem to be the issue - it does not animate regardless.

 

const numbers = document.querySelectorAll('#number-counter');
 
gsap.from(numbers, {
textContent: 0,
duration: 2,
snap: { textContent: 1 },
scrollTrigger: { trigger: section, start: 'top bottom', markers: true },
});
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...