Jump to content
Search Community

How can I pause while scrolling in ScrollTrigger?

goodcontext test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I read your question a few times but I'm still very confused about what you're asking. You want to pause the animation (but allow scrolling)? Or you want to pause scrolling so that even if the user is trying to drag the scrollbar (or spin their mouse wheel), it won't budge? 

  • Like 1
Link to comment
Share on other sites

  • Solution

I'm still not sure because your demo has multiple scrollbars. It sounds like maybe you want to do "pinning"? That doesn't actually stop the scrollbar from moving - it simply pins the element for a certain scroll distance. You can read in the docs about the "pin" property of ScrollTrigger. 

 

For the record, as a user I would HATE it if a site literally prevented me from moving the scrollbar or it stopped responding to my mouse wheel. But maybe I'm weird. 

  • Like 1
Link to comment
Share on other sites

It's for your convenience. For example, when you move a window, it sticks to the corner like a magnet.
If you scroll down the image, the image will go up straight, and if you pause for about half a second when the image is in the correct position, it will be much easier for the user to fit the image in the correct position.
I put a carousel in the middle, but if I scroll, it goes a little too far, so I can't see the top.
So that's how I thought about it.

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