Animated Counting Numbers In jQuery - numScroll.js

Animated Counting Numbers In jQuery - numScroll.js
File Size: 3.58 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

numScroll.js is a jQuery plugin to create an animated counter that animates counting from zero to the desired number on the screen.

How to use it:

1. Include the JavaScript numScroll.js after loading jQuery JavaScript library.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" 
        integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" 
        crossorigin="anonymous">
</script>
<script src="js/jquery.numscroll.js"></script>

2. Wrap the numerical value in an element.

<span class="num">
  123456789
</span>

3. You can also specify the numerical value in the data-num attribute.

<span class="num" 
      data-num="123456789">
</span>

4. Attach the plugin to the container element on DOM ready.

$(function(){

  $(".num").numScroll();

});

This awesome jQuery plugin is developed by chaorenzeng. For more Advanced Usages, please check the demo page or visit the official website.