plain javascript - increment number using function like $.animate with comma -


I am developing a game that will bring the sum of addition or subtraction to life.

jquery solution

How can I do this in a side javascript?

I want to avoid using jquery

In this solution, someone Also does not require jQuery

  var = 40000, = 50000; Work increment () {setTimeout (function () (from ++; if (from & lt; = from) {document.getElementById ("test"). InnerHTML =; increment ();}}, 10);} Increment ();  

Please go to jsfiddle


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

c# - Chart control: Design messed Up after clearing and re-adding Y-Values -

javascript - Bootstrap Modal won't close, previously appended to Body using JQuery -