scrollbar

Scrollbar customization and scrolling utilities.

Functions

Function
Description
Example

custom

Apply custom scrollbar styles

dphelper.scrollbar.custom('.container')

indicator

Add scroll progress indicator

dphelper.scrollbar.indicator({ el: '#content' })

position.get

Get saved scroll position

dphelper.scrollbar.position.get('#container')

position.set

Save scroll position

dphelper.scrollbar.position.set('#container')

smooth

Smooth mouse wheel scrolling

dphelper.scrollbar.smooth(target, speed, smooth)

scrollTo

Scroll to element

dphelper.scrollbar.scrollTo('#container', '#element', 20)

Description

Scrollbar management:

  • Custom Styling - Apply custom scrollbar CSS

  • Progress Indicator - Show scroll progress bar

  • Position Memory - Save/restore scroll position

  • Smooth Scrolling - Custom smooth scroll behavior

Usage Examples

Custom Scrollbar

Scroll Indicator

Scroll Position

Scroll To Element

Details

  • Author: Dario Passariello

  • Version: 0.0.2

  • Creation Date: 20210101

  • Last Modified: 20260220

  • Environment: Client-side only (browser)


Automatically generated document

Last updated