Jump to content
GreenSock

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

Mouse Wheel Scroll Distance

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

Share this post


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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×