Jump to content
Search Community

Max limit on number of scrollTriggers?

m4x1m test
Moderator Tag

Recommended Posts

I'm currently working on a project that will have quite a few animations that trigger upon scroll at various points throughout the website (most use batch arrays).

 

The animations all work fine UNTIL I add more than roughly 15 or so - and then none seem to fire. I remove a few and then they all work once again.

 

Here's a sample of a single instance of scrollTrigger that I'm using - how can I avoid this issue? Thanks in advance.

 

ScrollTrigger.batch(".client-logos img", {
  onEnter: elements => {
    gsap.fromTo(elements, {autoAlpha: 0, y: 30}, {autoAlpha: 1, y: 0, stagger: .1, start: "top center", duration: .3, delay: .5});
  },
  once: true
});
Link to comment
Share on other sites

Thanks Blake - I was testing things out and the issue ended up being a slight coding error. Glad to have fixed the issue, but embarrassed to have spent a few hours trying to sort this out. :)

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...