A jquery plugin that generate a styleable scrollbar.
Download the production version or the development version.
In your web page:
<div class="example"></div>
<script src="jquery.js"></script>
<script src="dist/jquery-asScrollbar.min.js"></script>
<script>
jQuery(function($) {
$('.example').asScrollbar({
namespace: 'asScrollbar',
skin: null,
handleSelector: null,
handleTemplate: '<div class="{{handle}}"></div>',
barClass: null,
handleClass: null,
disabledClass: 'is-disabled',
draggingClass: 'is-dragging',
hoveringClass: 'is-hovering',
direction: 'vertical',
barLength: null,
handleLength: null,
minHandleLength: 30,
maxHandleLength: null,
mouseDrag: true,
touchDrag: true,
pointerDrag: true,
clickMove: true,
clickMoveStep: 0.3, // 0 - 1
mousewheel: true,
mousewheelSpeed: 50,
keyboard: true,
useCssTransforms3d: true,
useCssTransforms: true,
useCssTransitions: true,
duration: '500',
easing: 'ease' // linear, ease-in, ease-out, ease-in-out
});
});
</script>