Jump to content

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

Mouse Wheel Scroll Distance

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is it possible to control scrolling so if a user scrolls down with their mouse we control that scroll to be exactly 100px. Maybe a little time delay to prevent scrolling 2 or 3 times over this. I would like to use this to control elements sliding in on an animation I'm working on. 


I have tried several plugins including fullpage.js but I need more control over the elements and to bring in other divs. 


Thank you 

See the Pen LLMVBO by deanr1976 (@deanr1976) on CodePen

Link to post
Share on other sites

First of all, welcome to the forums.


We're happy to answer GSAP-specific questions here, but we don't have the resources to solve general JS/CSS questions or build solutions for you. I can say that GSAP's ScrollToPlugin can definitely handle scrolling to wherever you want. You'd just need to handle the extra logic of listening for mouse wheel events, and building whatever tweens you need that go to the appropriate places. I imagine that what you're asking for is totally possible. 


Perhaps someone else in the community has time to build something for you or offer other advice - I just don't have that time right now. Again, we really try to keep the forums focused on GSAP-specific questions. 


Happy tweening!

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.