javascript - Trigger script on scroll -


jquery({somevalue: 0}).animate({somevalue: 38}, { duration: 1500, easing:'swing', step: function() {     $('#grow1').text(math.ceil(this.somevalue)); } }); 

how can make sure animation doesn't start until user scrolls down particular div?

you can use http://scrollmagic.io. allows define triggers in page , execute callbacks (in case animation) when triggers reached user. take @ example: http://scrollmagic.io/examples/basic/custom_actions.html

hope you


Comments

Popular posts from this blog

php - Auto increment employee ID -

php - isset function not working properly -

python - Evaluating the next line in a For Loop while in the current iteration -