Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
daantrical

How can I disable 'free scroll' with ScrollTrigger

Recommended Posts

Hi,

 

I' am trying to disable free scroll with ScrollTrigger, Right now when I scroll I get automatically scrolled to my next section. But I am able to keep scrolling even when the animation is active, is there a way to disable 'free scroll'

Link to post
Share on other sites

Not sure what you mean by free scroll... maybe pin?

 

Did you go through the docs and the demos?

  • Like 1
Link to post
Share on other sites

I'm not sure what you mean either, but perhaps you wanted to set overflow: hidden on the body/html during the animation? 

 

I personally hate when web sites force me to sit through an animation and refuse to let me scroll until it's done, but maybe that's just me :)

  • Like 1
Link to post
Share on other sites

I created a pen, this is what is have.

See the Pen gOmMPRy by daandev (@daandev) on CodePen

 

But I want when you scroll it scrolls to the next 'slide' but you should not be able to scroll through the animation. Is that possible

 

Link to post
Share on other sites
1 hour ago, daantrical said:

But I want when you scroll it scrolls to the next 'slide' but you should not be able to scroll through the animation. Is that possible

 

That doesn't sound like scrolling, more like pseudo scrolling via mouse wheel events and gestures. ScrollTrigger is designed to work with the browser's native scrolling behavior. 

 

You need to choose the right tool for the job. In your case, I don't think ScrollTrigger is the right tool. That doesn't mean you shouldn't use GSAP, it just means you need to take a different approach.

 

Check out these threads for ideas about how to handle this...

 

 

 

 

 

 

  • Like 4
  • Thanks 1
Link to post
Share on other sites

Okay, clear.

Thanks for the advice!

Link to post
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.

×