Jump to content
Search Community

Draggable ScrollTop Question

Larc test
Moderator Tag

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

Sure, just make sure you set overflow-y inline after you create the Draggable because by default Draggable will automatically set that value according to its type. Here's a simple way (after you create the Draggable):

TweenLite.set("#scroller", {overflowY:"hidden"});

I'm curious why you'd want to use scrollTop instead of just using "y" and setting overflow:hidden. 

Link to comment
Share on other sites

I found the solution. 
The problem: 
Hiding the scroll bar with some method like: 
overflow-y: hidden; 


TweenLite.set ("# scroller", {overflowY: "hidden"}); 
The event mouse wheel stops working. 
The solution is to revive the event with something like: 
$ event.props.push ("wheelDelta").; 
$ ('Element'). On ('mousewheel DOMMouseScroll', function (e) {
var delta = e.wheelDelta | |-e.detail; 
this.scrollTop + = (delta <0 1: -1) * 30; 
e.preventDefault (); 
this with the help of jQuery.
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...