Posted By

envane21 on 06/17/16


Tagged

number to from counter 0


Versions (?)

Counter from 0 to number


 / Published in: jQuery
 

Counter from 0 to number

  1. $('.count').each(function () {
  2. $(this).prop('Counter',0).animate({
  3. Counter: $(this).text()
  4. }, {
  5. duration: 4000,
  6. easing: 'swing',
  7. step: function (now) {
  8. $(this).text(Math.ceil(now));
  9. }
  10. });
  11. });
  12.  
  13.  
  14. HTML
  15.  
  16. <div id="shiva"><span class="count">200</span></div>

Report this snippet  

You need to login to post a comment.