Re:NanoScroller.js - An easy-to-use jQuery scrollbar that lo...
by jamesflorentino on Wednesday December 07, 2011 @11:17AM
(#3324397)
Thanks! That seems pretty useful. Will include that in my next commit.
Re:NanoScroller.js - An easy-to-use jQuery scrollbar that lo...
by sil3ntmac on Wednesday December 07, 2011 @01:56PM
(#3325256)
I implemented something similar here: https://github.com/joevennix/jScrollie
I agree that it is best to let the browser handle the scrolling mechanics. Then you simply hide the original scrollbar by having an embedded div hold the content with a width thats about 40px or so bigger than the outer, fixed width div ( and overflow: scroll-y ).
Re:NanoScroller.js - An easy-to-use jQuery scrollbar that lo...
by kyle81 on Wednesday December 07, 2011 @11:56AM
(#3324585)
wow, it looks like a rip off of an older project - http://rocha.la/jQuery-slimScroll
The best technical approach is to make the scrollable element naturally scrollable with overflow: auto, and then put it inside a viewport element (overflow: hidden) narrow enough to cut off the scrollbar (there are plugins that can help you figure out exactly how wide the host's OS's scrollbars are).
Then, you're free to listen for scroll events and overlay your own custom scroller UI.