Fork me on GitHub

nanobar.js

Very very lightweight progress bars (840 ~630 bytes gzipped).
No jQuery required.

For iE9 iE7+ and the rest of the world



Example

var options = {
	bg: '#acf',

	// leave target blank for global nanobar
	target: document.getElementById('myDivId'),

	// id for new nanobar
	id: 'mynano'
};

var nanobar = new Nanobar( options );

// move bar
nanobar.go( 30 ); // size bar 30%

// Finish progress bar
nanobar.go(100);

Installation

Download and extract the last release from here or install with package manager:

Bower:

$ bower install nanobar

npm:

$ npm install nanobar

Usage

Link nanobar.js from your html file

<script src="path/to/nanobar.js"></script>

or require it with Browserify:

var Nanobar = require('path/to/nanobar')

Generate progressbar

var nanobar = new Nanobar( options );

options

Move bar

Resize the bar with nanobar.go(percentage)

arguments




© 2014 jacoborus - MIT License