Skip to content
Show a progress bar about page scroll position.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
javascripts
stylesheets
LICENSE
README.md
index.html

README.md

scroll_progress

Show a progress bar about page scroll position.

Develop note

Usage

Need embed scroll_progress.js and scroll_progress.css

Call a function

ScrollProgress();

It can show default progress bar on the top.

You also can customize progress position thick and color.

Add a object as a parameter in ScrollProgress()

parameter

  • position [string]

    • Define progress bar position

    • left, right, top, bottom, default is top.

  • thick [number]

    • Show progress bar thickness, default is 5.
  • color [string]

    • Show progress bar color, default is #ff0000.

Example

var setting = {
    position: 'left',
    thick: 10,
    color: '#ff8800'
}
ScrollProgress(setting);

// or
var setting = {
    color: '#ff8800'
}
ScrollProgress(setting);
You can’t perform that action at this time.