How to run jquery countTo plugin when scrolling one once? -
how run jquery countto
plugin when scrolling 1 time?
$(window).scroll(function(){ $(".fact-to:in-viewport").countto({ speed: 500, refreshinterval: 2 }); });
add flag:
var countflag = false; $(window).scroll(function(){ if(!countflag) { countflag = true; $(".fact-to:in-viewport").countto({ speed: 500, refreshinterval: 2 }); } });
Comments
Post a Comment