0.0.2 • Published 12 years ago
loading-bar v0.0.2
loading-bar 

A quick-and-dirty loading bar for use in your larger demos.
Usage
require('loading-bar')([fill, width, height, border])
Creates a new loading bar element, ready to be attached to the DOM. All arguments are optional:
fill: the color of the loading bar, as a CSS string. Defaults to#fffwidth: the width of the loading bar in pixels. Defaults to500height: the height of the loading bar in pixels. Defaults to30border: the size of the inner and outer border in pixels. Defaults to4.
bar.append([parent])
Appends the loading bar to parent, which defaults to document.body.
bar.update(t)
Pass a value between 0 and 1 to this function to update the progress of the loading bar.
bar.remove()
Removes the bar from the DOM.
bar.fadeout([duration])
Fades the loading bar out over duration milliseconds. Defaults to 1 second.
License
MIT. See LICENSE.md for details.
