miniature library for adding an indeterminate progress bar
Only need a simple progress bar to show that something is loading/downloading?
Include in script tag:
<script src="dist/mipb.min.js"></script>
this exposes the global mipb
class
var pBar = new mipb(options)
this instantiates the progress bar, and appends a micro-snippet of css to the document <head>
defaults = {
bg: "transparent", //background color for the bar
fg: "#f00", // foreground color for the bar
frame: 2, // how many seconds the animation should take
selector: "body", // where to append the bar
height: 3 // bar height in px
};
pBar.show()
pBar.hide()
pBar.toggle()