Sree Posted July 20, 2021 Share Posted July 20, 2021 Helllo, I was building a horizontal scrolling website (The whole website is horizontally scrolled). Right now the horizontal scroll works fine with mousewheel. I also needs to do the same on mousedrag. I tried to add a custom function to do the same but it animate the whole sections scroll to end. Instead it needs to be excactly the same as mouswheel scroll. Any ideas or suggestions would be very helpful. Thanks See the Pen xxdLVaY by DeCodeUI (@DeCodeUI) on CodePen Link to comment Share on other sites More sharing options...
Solution akapowl Posted July 20, 2021 Solution Share Posted July 20, 2021 Hey @Sree The 'ScrollTrigger How-To Pens' collection on codepen contains an example for how to implement dragging in a scenario as such with GSAP's draggable plugin, making use of a proxy element. That one should get you running See the Pen ZELQqeJ by GreenSock (@GreenSock) on CodePen 3 1 Link to comment Share on other sites More sharing options...
Sree Posted July 20, 2021 Author Share Posted July 20, 2021 @akapowl That awesome. Exactly what I needed. I have been trying to solve this issue for the past two days. Thanks a lot. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now