I'm doing an animation where when the TOP > 2800 the animation will start. The animation will make the numbers within a UL LI increase from 0 to the number written.
BUG: The number sometimes goes up all the way and another one appears, or it only increases a little and when you move the screen it increases little by little.
window.onscroll = function(){
var top = window.pageYOffset || document.documentElement.scrollTop
if( top > 2800 ) {
$('.spincrement').spincrement({
from: 0,
decimalPlaces:0 ,
duration: 4000,
});
}
};