Skip to content
This repository has been archived by the owner on Feb 28, 2019. It is now read-only.

Options

nathggns edited this page Apr 22, 2012 · 4 revisions

Options

There are numerous options available to you, to edit how the script works. I will detail these options below.

xSpace and ySpace

Default

"auto"

Use

This option changes the amount of space given to the scrollbar containers. Auto will equate to the size of the scrollbar containers, specified in css.

Accepted value

Numeric values or "auto".

Example

The below example will create the popular overlay scrollbars found in Mac OS X Lion, for all elements.

$("*").scrollbars({ xSpace: 0, ySpace: 0 });

mousewheel

Default

true

Use

This option tells the script if mousewheel support should be enabled. Mousewheel support will be turned off regardless if the jQuery mousewheel plugin is not present.

Accepted values

true / false (enabled / disable respectively)

Example

The below script will disable mousewheel support.

$("*").scrollbars({ mousewheel: false });

mousedrag and mousedragcursor

Default

false and "move" respectively.

Use

mousedrag decides if the use can scroll by dragging the content around. This option is true regardless if on a mobile phone. mousedragcursor decides what cursor is used while dragging. (only relevant on a normal computer)

Accepted values

true / false and any css cursor attribute (mousedrag and mousedragcursor respectively)

Example

The following will turn on mousedrag and the cursor used will be pointer.

$("*").scrollbars({ mousedrag: true, mousedragcursor: "pointer" });

clicktoscroll

Default

true

Use

Decides if a user can scroll to a point by clicking on it's position in the scrollbar container.

Accepted values

true / false

Example

The following will turn off click to scroll

$("*").scrollbars({ clicktoscroll: false });

***
**Page not finished**