user1022241
user1022241

Reputation:

Can I hide scroll bars but keep overflow on?

I want to make a custom horizontal scrollbar so that all OSs render it the same, no ugly windows scrollbars.

I know how to make one via JS using some division with scroll top, but I need to hide the default scroll bars, but leave overflow on so I can still detect the onscroll event (so gestures on OSX touchpad, mousewheeel, etc. are all handled for me and trigger the onscroll callback).

Ideas?

Upvotes: 4

Views: 518

Answers (3)

InuYaksa
InuYaksa

Reputation: 726

You have to manage all by yourself. iOS devices doesn't trigger scroll events like desktop browser. You have scroll event only at the end of the touch. If you want track all the scrolling sequence, you have to track the touchstart/touchmove/touchend (and touchcancel).

http://developer.apple.com/library/IOs/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html

Upvotes: 0

zwol
zwol

Reputation: 140786

overflow:hidden should do what you want; it can still be programmatically scrolled.

Upvotes: 0

Robin
Robin

Reputation: 21894

Take a look at these examples: http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html

Not sure if the onscroll event is triggered, never tried it. If not, the mousewheel plugin included probably gives you some callbacks to handle what you want...

Upvotes: 0

Related Questions