I am trying to use the following code to increase the number in a text box
// Animate the element value from 0 to 1100000: $({someValue: 0}).animate({someValue: 1100000}, { duration: 1000, step: function() { // called on every step // Update the element text with value: $('#counterx').text(Math.floor(this.someValue+1)); } });
it works with small numbers, for example, from 0 to 100, but when it comes to a large number, as in the mentioned code, it does not give the target number, it brings to life numbers like 1099933 or 1099610 or ..... and every time, when it changes.
so how can i make it animate the number i specified?
medo ampir
source share