A slim progress bar with no dependencies
Switch branches/tags
Nothing to show
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.
test
.gitignore
.jshintrc
.travis.yml
LICENSE
README.md
index.html
mprogress.js
package.json

README.md

MProgress Build Status

A slim progress bar with no dependencies. Similar to nprogress.

Usage

<script src="mprogress.js"></script>
var mprogress = new MProgress();

mprogress.interval().show();

// do stuff

mprogress.hide();

Functions

  • MProgress([styles]): Constructor function. styles is a object containing HTMLElement.style properties, used to override the default style.
  • interval([interval]): Create a timer that calls increase() with a default interval of 500ms. Automatically removed in remove().
  • show(): Append element to body.
  • hide(): Finish progress bar and call remove().
  • remove(): Remove element from body and detach timers.
  • set(value): Set current progress to percentage value.
  • get(): Return current percentage value.
  • increase([value]): Increase progress bar value. If value is not passed, a random value is chosen.

All functions that don't return a value are chainable.