Jump to content
Search Community

registerPlugin() doesnt work/ ScrollTrigger

LX45 test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

It's difficult to troubleshoot by just looking at a few screenshots, but the errors make it sound like you wrote your ScrollTrigger stuff incorrectly. For example, you'd get those errors if you did this: 

// BAD
gsap.to(".whatever", {
  scrollTrigger: ".whatever",
  pin: true,
  end: "x=500",
  scrub: 1
});

Instead of this:

// GOOD
gsap.to(".whatever", {
  scrollTrigger: {
    trigger: ".whatever",
    pin: true,
    end: "x=500",
    scrub: 1
  }
});

Notice the ScrollTrigger-related values are nested in a "scrollTrigger" object. In the first example, you're literally telling GSAP that you want to animate the element's "pin", "end", and "scrub" properties (and of course those don't exist). 

 

If you still need some help, please provide a minimal demo and we'd be happy to take a peek. 

 

Happy tweening!

  • Like 4
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...