jQuery loading bar loop -
I'm trying to create a loading bar that animates for 5 seconds and when it's finished Then he goes on and on to the ends continuously
I have got such a work on the example below, but sometimes when the time is completely full, then go back to the beginning and start again Before there is a long break, does anyone know how to fix this? Is there a better way of?
Load (); Function Load () {$ ('Progress Div'). Animate ({width: '100%', 5000, load); SetTimeout (function () {$ ('progress div'). Animate ({width: '0%'}, 1, load);}, 5000); }
Try it out:
load (); Function Load () {$ ('Progress Div'). Animate ({width: '100%'}, 5000, function () {// animation full. $ ('Progress div'). Width (0) load ();}); }
Comments
Post a Comment