Facebook's horizontal scrollbar in ticker & ch

2019-02-02 02:20发布

问题:

There is another question regarding this issue (hide scrollbar and show on hover like facebooks new chat sidebar), but I'm interested in how they have achieved the styling of the scrollbar. I have only one guess, and that is that their putting their own div right where the scrollbar would be, thus hiding it and simply making their own "gripper" follow the scroll height.

I need to add vertical scrolling to a fixed positioned div, and if anyone knows a good plugins (or can tell me how to make my own) to achieve this I'd be glad to hear about them.

Thanks

回答1:

jQuery UI actually has a nice little slider plugin that you can style anyway you like. Take a look at the demo here:

http://jqueryui.com/demos/slider/side-scroll.html

Main plugin page:

http://jqueryui.com/demos/slider/#side-scroll

Another awesome plugin that i've used on a now-dead site is this one:

http://jscrollpane.kelvinluck.com/basic.html



回答2:

there is a jQuery plugin just for that, look at http://rocha.la/jQuery-slimScroll



回答3:

nanoScroll is pretty clean implementation http://jamesflorentino.github.com/nanoScrollerJS/