loading-bars
Loading bars like Gmail and other Google apps for Android.
Demo: http://AndersDJohnson.github.io/loading-bars/example/index.html
Install
Install with bower:
$ bower install --save loading-bars
Install with npm:
$ npm install --save loading-bars
Use
Include src/bars.js
on your page.
Simple
var bars = ;barsstart;
Custom colors
var bars = 'red' 'orange' 'yellow' 'green' 'blue' 'purple';barsstart;
Options
You can pass an options object to new Bars( { /* ... */ } )
.
Here are more options - the current defaults:
/* you can provide an animation function in format of jQuery Easing (http://gsgd.co.uk/sandbox/jquery/easing/) */ progressFn: easeOutQuad /* control the frame rate */ frameRate: 60 /* spread factor - not recommended to change */ spreadFactor: 3 /* control the animation speed */ secondsPerLoop: 2 /* these are the bar colors */ bars: '#008844' '#ee0000' '#0066ff' '#ffcc00' /* the parent element to attach to */ parent: documentbody