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     });   } }); 

or unbind event handler


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -