Jump to content
Search Community

Scrolltrigger error: Failed to execute 'getComputedStyle' on 'Window' when pinning

rtagliavia test
Moderator Tag

Recommended Posts

Hi Im setting a Scrolltrigger to pin and element with an ID and animate an element inside it.
Here is my code:

const scrooltriggerAnimation = gsap.timeline({
    scrollTrigger: {
    trigger: "#myID"
    markers: false,
    start: "top 0",
    end: "+=100",
    pin: 1,
  //scrub: 0.2
}})
scrooltriggerAnimation.from("#myID .animate-me", { opacity: 0, yPercent: 200, duration: 5, ease: "power2.out" });

When enabling pinning of the element im getting Failed to execute 'getComputedStyle' on 'Window' when pinning.
If pinning is disabled animation triggers at the right position and no error is given

Any ideas how to debug this or work arounds?

 

Thanks in advance.

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