Interface CustomScrollbarOptions

Index

Properties

Properties

optional public advanced?: { updateOnBrowserResize?: boolean; updateOnContentResize?: boolean; autoExpandHorizontalScroll?: boolean; autoScrollOnFocus?: boolean; normalizeMouseWheelDelta?: boolean; }

optional public advanced.autoExpandHorizontalScroll?: boolean

Auto-expanding content's width on horizontal scrollbars, values: true, false. Set to true if you have horizontal scrollbr on content that change on-the-fly. Demo contains blocks with images and horizontal scrollbars that use this option parameter

optional public advanced.autoScrollOnFocus?: boolean

Auto-scrolling on elements that have focus (e.g. scrollbar automatically scrolls to form text fields when the TAB key is pressed), values: true, false

optional public advanced.normalizeMouseWheelDelta?: boolean

Normalize mouse wheel delta (-1/1), values: true, false

optional public advanced.updateOnBrowserResize?: boolean

Update scrollbars on browser resize (for fluid content blocks and layouts based on percentages), values: true, false. Set to false only when you content has fixed dimensions

optional public advanced.updateOnContentResize?: boolean

Auto-update scrollbars on content resize (useful when adding/changing content progrmatically), value: true, false. Setting this to true makes the script check for content length changes (every few milliseconds) and automatically call plugin's update method to adjust the scrollbar accordingly

optional public autoDraggerLength?: boolean

Auto-adjust scrollbar height/width according to content, values: true, false

optional public autoHideScrollbar?: boolean

Automatically hide the scrollbar when idle or mouse is not over the content

optional public callbacks?: { onScrollStart?: () => void; onScroll?: () => void; onTotalScrollBack?: () => void; onTotalScrollOffset?: number; whileScrolling?: () => void; }

All of the following callbacks option have examples in the callback demo - http://manos.malihu.gr/tuts/custom-scrollbar-plugin/callbacks_example.html

optional public callbacks.onScroll?: () => void

User defined callback function, triggered on scroll event. Call your own function(s) each time a scroll event completes

optional public callbacks.onScrollStart?: () => void

User defined callback function, triggered on scroll start event. You can call your own function(s) each time a scroll event begins

optional public callbacks.onTotalScrollBack?: () => void

User defined callback function, triggered when scroll end-limit is reached

optional public callbacks.onTotalScrollOffset?: number

Scroll end-limit offset, value in pixels

optional public callbacks.whileScrolling?: () => void

User defined callback function, triggered while scrolling

optional public contentTouchScroll?: boolean

Additional scrolling method by touch-swipe content (for touch enabled devices), value: true, false

optional public horizontalScroll?: boolean

Add horizontal scrollbar (default is vertical), value: true, false

optional public mouseWheel?: boolean

Mouse wheel support, value: true, false

optional public mouseWheelPixels?: any

Mouse wheel scrolling pixels amount, value in pixels (integer) or "auto" (script calculates and sets pixels amount according to content length)

optional public scrollButtons?: { scrollType?: string; scrollSpeed?: any; scrollAmount?: number; }

optional public scrollButtons.scrollAmount?: number

Scroll buttons pixels scrolling amount, value in pixels

optional public scrollButtons.scrollSpeed?: any

Scroll buttons continuous scrolling speed, integer value or "auto" (script calculates and sets the speed according to content length)

optional public scrollButtons.scrollType?: string

Scroll buttons scroll type, values: "continuous" (scroll continuously while pressing the button), "pixels" (scrolls by a fixed number of pixels on each click")

optional public scrollInertia?: number

Scrolling inertia (easing), value in milliseconds (0 for no scrolling inertia)

optional public set_height?: any

Set the height of your content (overwirtes CSS height), value in pixels (integer) or percentage (string)

optional public set_width?: any

Set the width of your content (overwrites CSS width), value in pixels (integer) or percentage (string)

optional public theme?: string

Set a scrollbar ready-to-use theme. See themes demo for all themes - http://manos.malihu.gr/tuts/custom-scrollbar-plugin/scrollbar_themes_demo.html