Loading Gif

jQuery Scrollbar plugin

08Nov2012

jQuery Scrollbar plugin

This is a plugin for jQuery which adds a custom stylable scrollbar to any scrollable div.

I wrote the plugin due to the horrible design of many inbuilt scrollbars. It works exactly the same as a default scrollbar, can be controlled by the mouse scroller etc but it CAN be styled unlike the built in variety.

You can download the plugin by clicking on the link in the downloads section of the sidebar.

Usage

First copy the scrollbar script to your server. Then include jQuery and the scrollbar script in the head section of your website.

Then initiate the plugin by using the script below (make sure to wrap the script in a document ready or similar function).

To use the built in popup plugin

The scrollbar plugin is easily styled from the css and has two inbuilt options.

  • bgColor: The color of the trackbar
  • draggerColor: The color of the dragger

Initiate the plugin with the script below.

Multiple scroll areas? No problemo! the script allows you to create as many scroll areas on one page as you want.