Jump to content
Search Community

Hide scrollbar?

BSaunders
Moderator Tag

Go to solution Solved by Diaco,

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

BSaunders
Posted

Any way to hide the browser scrollbar on draggable?  It looks like the system adds an inline style attribute, so using css is (slightly) more difficult.

  • 8 months later...
Posted

Using TweenMax.set(".scrollbox", { overflow: 'hidden' }) disables scrolling with a mouse wheel (I'm using a scroll event listener). Any suggestions would be appreciated. Thanks.

Posted

One problem with that is that it doesn't seem to work for touch. 

 

You can push them out of view...

See the Pen EjbXda by osublake (@osublake) on CodePen.

 

If you know the height of the container, you can hide them with nesting.

http://jsfiddle.net/OSUblake/q6kqdroq/1/

 

Not sure if other browsers support this yet, but you can hide them with css in webkit.

::-webkit-scrollbar {
  display: none;
}
  • Like 2
Posted

Thanks. I'm going keep the mousewheel event handler in mind for future projects...had used similar code in Silverlight mapping projects, but kinda forgot about it for HTML5. (Duh). For simplicity's sake, since my DIVs are absolutely positioned, I'm just using margin-right: -20px. But will probably use the code in OSUblake's "push them out of view" example since scroll bars vary in width (i.e. desktop vs. iOS).

  • 1 year later...
frontenddeveloper
Posted

@OSUblake
Your response helped me heaps. Cheers, from Australian Front End Dev. 

  • Like 2

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...