It looks like you're new here. If you want to get involved, click one of these buttons!
<div id="progress-bar"> </div>However, including the Story JavaScript code & Story StyleSheet CSS doesn't work:
function 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) }Story Stylesheet:
#progress-bar { width: 0; background: #f78; text-align: center; overflow: hidden; }
Comments
Solutions:
Try this: n.b. $bar is not a story variable. I find that prefixing jQuery-wrapped elements with the dollar sign is a nice convention.
This works and I'm really grateful for you pointing out what I did wrong so I can learn from it.