I'm trying to include a progress bar in Squiffy using -
<div id="progress-bar">X</div>
I added an extra JavaScript and CSS file to the Squiffy
index.html (added lines in <head>)<script src="progress.js"></script>
<link rel="stylesheet" href="progress.css"/>
progress.css#progress-bar {
width: 0;
background: #f78;
text-align: center;
overflow: hidden;
}
progress.jsfunction progress() {
var progressBar = $('#progress-bar'),
width = 100;
progressBar.width(width + '%');
var interval = setInterval(function() {
width -= 10;
progressBar.css('width', width + '%');
if (width <= 0) {
clearInterval(interval);
}
}, 1000)
}
Here is a preview of how it should work:
http://jsfiddle.net/94wKr/I'm probably forgetting something simple, but any help would be appreciated. Thanks.