I have a problem where the animate()jQuery function does not complete the animation of my number count. It is expected that the animation will count from 0 to 5000, but when updating it sometimes ends at 4999, in other cases - 4989, etc.
It works 80% of the time correctly, but in 20% of cases when you refresh the page, the animation ends up at a different number. What am I doing wrong?
http://jsbin.com/dobajepoti/2/ (keep updating the page to see it)
source
share