How to use JavaScript to organise the increasing number from 0 to let's say 3000 to get a smooth bust (0, 1, 2, 3, 4, 5 ... )?

0 like 0 dislike
3 views
How to organize an increasing number of from 0 to let's say 3000 to get a smooth bust (0, 1, 2, 3, 4, 5 ... )? The duration of this bust should be monitored. That is, if I want, I can specify 1500 MS or 3000 MS.
this script will need to here such a thing jsfiddle.net. When the bars are rising, the number should grow from $0 to $3000.
PS: after all this time appeared/found a jQuery plugin for such purposes: jquery-animateNumber – plugin for animating numbers
by | 3 views

2 Answers

0 like 0 dislike
by
0 like 0 dislike
Use setInterval.
It is triggered every n milliseconds. Inside colback pass the appropriate html element, not to the wool of the dom tree on every invocation of colback.
by
110,608 questions
257,186 answers
0 comments
28,868 users