Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var progressBar = null;
- for (var i = 0; i <= 100; i ++) {
- progressBar = new ProgressBar();
- progressBar.label = "Progress: "+i+"%";
- progressBar.appendTo(document.querySelector(".container"));
- progressBar.setValue(i);
- }
- var value = 0, direction = false, step = 1;
- progressBar = new ProgressBar();
- progressBar.label = "Live";
- progressBar.appendTo(document.querySelector(".container"));
- var intv = window.setInterval(function() {
- if (direction) {
- value -= step;
- } else {
- value += step;
- }
- progressBar.setValue(value);
- if (value >= 100 || (value <= 0 && direction))
- direction = !direction;
- },33);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement