Guest User

Untitled

a guest
Jan 19th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. var flag = true,
  2. win = $(window).scrollTop(),
  3. blockTop = $(".support_month").offset().top;
  4.  
  5. $(window).scrollTop(function () {
  6. if ( blockTop < win ) {
  7. while (flag) {
  8. $('.counter-number').each(function () {
  9. $(this).prop('Counter',0).animate({
  10. Counter: $(this).text()
  11. }, {
  12. duration: 1000,
  13. easing: 'linear',
  14. step: function (now) {
  15. $(this).text(Math.ceil(now));
  16. }
  17. });
  18. });
  19. flag = false;
  20. }
  21. }
  22. })
  23.  
  24. ;
  25.  
  26. AOS.init(
  27. {
  28. duration: 300
  29. });
  30.  
  31. <div data-aos="fade-up"></div>
Add Comment
Please, Sign In to add comment