Jump to content


Draggable ScrollTop Question

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

Hello everyone. 


Is it possible to use scrollTop not show scroll? 


something like overflow-y: hidden;

Link to comment
Share on other sites

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

Hi thanks for replying. 


the solution you give me is great, but to hide the scroll using scroll with the mouse wheel is disabled. 
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

Glad that you work it out and thanks for sharing the solution!!


Not everyday you come across a browser hack that doesn't involve IE  :blink:



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.