Need a simple custom scrollbar

I have a div that overflows-y: hidden; overflow-x: auto; and rendering the scrollbar exactly the way I want. I have all the scroll functions and everything that I want to improve already. Now all I want to do is replace the default browser scrollbar with a custom one.

It should work on IE7 + and Firefox and Mac Safari computers, so it must be JavaScript or jQuery. I already tried four different plugins that I found, but none of them worked due to jQuery version (1.6.2), didn’t work in all necessary browsers or did not work for horizontal scrollbar, etc. The ones I tried were the jQuery UI slider, the jQuery custom scrollbar, the tiny scrollbar, and jScrollPane.

I hope there is a simple plugin there, but I can not find it.

+4
source share
1 answer

I have used Flexcroll several times and it works great. Good browser support, and it also handles touch events for mobile devices.

The appearance of scroll bars is carried out using a sprite, which is quite easy to customize. This is 17.5 KB, which is about 8 KB in compression, so it’s nice not to have the overhead of the whole library when that’s all you need.

http://www.hesido.com/web.php?page=customscrollbar

+5
source

Source: https://habr.com/ru/post/1380236/


All Articles