This small library gives you a tiny API to create and interact with a native browser scrollbar.
Live example: http://warpech.github.io/very-native-scrollbar
Constructor
Sets a callback function that will be called (without any arguments) on scrollbar scroll
events.
Sets the top scrollbar position in pixels, relative to the viewport (position: fixed
)
Sets the left scrollbar position in pixels, relative to the viewport (position: fixed
)
Sets the width of the scrollbar in pixels. Changes scrollbar dimension to horizontal
Sets the height of the scrollbar in pixels. Changes scrollbar dimension to vertical
Sets the width in pixels of the internal scrolled area (usually it is greater than the scrollbar width; otherwise scrollbar handle won't show up). Use only after setWidth
(horizontal scrollbar)
Sets the height in pixels of the internal scrolled area (usually it is greater than the scrollbar height; otherwise scrollbar handle won't show up). Use only after setHeight
(vertical scrollbar)
Sets the scrollbar handle position in pixels
Returns the current scrollbar handle position in pixels
Sets the scrollbar handle position in relative value from 0 to 1.
Returns the current scrollbar handle position in relative value from 0 to 1.
Change class name to be very-native-scrollbar
.
Initial release
MIT (see the LICENSE file)