Are you going to track the user's interaction with the animation? This would make a difference. Anyhow, I guess one way would be to know how many labels you have and when they click on the next one then you calculate the size of the bar compare to the label.
1 person found this helpful
You could use something similar to this for the bar.
var totalSize = 200;
var totalLabels = 5;
var currentSize = 0;
var newSize = totalSize/totalLabels * i;
alert('You are done');
Sample file here: currentSize.zip - Box
Disregard my last entry. We're trying to create something similar to the link I entered - but I realize now it really has nothing to do with the progress bar.
No - not really trying to track the user's interaction - just provide a visual as to where they are in the course. I'll give the code a try. Thanks!
Let us know if you need more help.
In case you just need a visual progress bar animating over time and no user interaction required , you can check the attached sample I created. It simply has 2 rectangles.
Thanks and Regards,
progressbar.zip 72.8 K