Jump to content
GreenSock

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

Horizontal scroll with mouse using Draggable

Recommended Posts

Hi all,

 

Looking for a hand or some advice if possible. I've created this codepen (below) and it works well enough when you drag the content horizontally but I would also like to be able to scroll with the mouse through the content, very much like the functionality of this website - https://antoni.de/cases/

 

 

I'm fairly new to Javascript and certainly GSAP, so any input is much appreciated.

 

Thanks

 

Jon

 

See the Pen aXvOyx by JonQuayle (@JonQuayle) on CodePen

 

See the Pen aXvOyx by JonQuayle (@JonQuayle) on CodePen

Link to comment
Share on other sites

I suspect this post and demos from @PointC will have some pointers for you. 

 

 

  • Like 2
Link to comment
Share on other sites

Hi @JonQuayle,

 

Welcome to the GreenSock Forum.

 

Here's a suggestion to combine drag and scroll:

 

See the Pen ZwbZVy by mikeK (@mikeK) on CodePen

 

Happy tweening . ...

Mikel

 

 

 

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.

×