Skip to content

weekaah/scrollprogress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scroll Progress Javascript

Simple JavaScript plugin that indicates scroll progress.

Demo

See it in action - Demo

Installation

Include scrollprogress.min.js inside <body> tag.

<!-- javascript -->
<script src="scrollprogress.min.js"></script>

Usage

Initialize the plugin by running scrollprogress();.

First argument is the selector and is mandatory, while the second argument (options) can be omitted and will fall back on defaults.

<script>
  scrollprogress('body');
</script>

Options

Pass a "options" object as a second argument to override the plugin defaults.

scrollprogress('body', {
  // Options
});
Property Type Default Description
height string "4px" Defines the height of the horizontal progress bar on top of the screen.
backgroundColor string "#6deabb" Progress bar background color.
glow bool true Adds a glow around the progress bar using css property "box-shadow".
glowLevel string "4px Define the size of the glow
transparency bool false Enable/disable progress bar transparency
transparencyLevel number 0.75 Define transparency level ( from 0 to 1 ).

About

javascript plugin indicating scroll progress with a horizontal bar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published