A simple jQuery plugin for custom scrollbars
An iOS style is included.
- jQuery 1.9+
- Requirejs
To add the scrollbar to an element you do:
$('#scrollbar').scrolli([options]);
-
axis
: vertical or horizontal scrollbar ( x || y ). default: y -
wheel
: how many pixels must the mouswheel scroll at a time. default: 40 -
scroll
: enable or disable the mousewheel. default: true -
lockscroll
: return scrollwheel to browser if there is no more content. default: false -
size
: set the size of the scrollbar to auto or a fixed number. default: 'auto' -
sizethumb
: set the size of the thumb to auto or a fixed number. default: 'auto' -
invertscroll
: Enable mobile invert style scrolling default: false -
autohide
: Hides the scrollbar when mouseleaves the content area default: true -
prefix
: is used to add a prefix whereever is needed default: '' -
noSelectClass
: default: 'no-select'
- Destroy function should fall back on using native scrollbars
- Make vertical scrollbars work as the horizontal axis
Initial code taken from Maarten Baijs
Updated by @giannis
Dual licensed under the MIT or GPL Version 2 licenses.