animating roll number - Free Download jQuery Plugin For Animating Numbers - rollNumber

Free Download jQuery Plugin For Animating Numbers – rollNumber

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin For Animating Numbers – rollNumber, hope it will help you in programming stack.

animating roll number - Free Download jQuery Plugin For Animating Numbers - rollNumber
File Size: 33.1 KB
Views Total: 2637
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

rollNumber is an easy and tiny jQuery plugin to create an animated counter that animates a numeric value from zero to a new one at a given speed.

See Also:

How to use it:

1. Create a container for the animated counter.

1 <div class="counter"></div>

2. Load the rollNumber plugin after jQuery library.

1 <script src="/path/to/cdn/jquery.min.js"></script>
2 <script src="/path/to/js/jquery.rollNumber.js"></script>

3. Initialize the plugin on the counter container and determine the numberic value that counter will count up towards as follows:

1 $('.counter').rollNumber({
2   number: 123456
3 })

4. Or specify the number in the data-number attribute in cases where you have multiple counters on a page.

1 <div class="counter"
2      data-number="123456">
3 </div>
4  
5 <div class="counter"
6      data-number="654321">
7 </div>
8  
9 ...

5. Customize the style of the animated counter.

1 $('.counter').rollNumber({
2   fontStyle: {
3     font-size: 16,
4     color: '#FF0000',
5     font-family: 'Roboto',
6     // more styles here
7   }
8 })

6. Determine the animation speed. Accepted values: ‘slow’, fast’, or milliseconds. Default: 100.

1 $('.counter').rollNumber({
2   speed: 200
3 })

7. Determine the time to wait before animating the number. Default: 100.

1 $('.counter').rollNumber({
2   interval: 200
3 })

8. Customize the character used as the thousands separator. Default: false.

1 $('.counter').rollNumber({
2   fsymbol: ','
3 })

9. Determine whether to add leading zeros to numbers.

1 $('.counter').rollNumber({
2   rooms: 9
3 })
4  
5 ==> 000123456

Changelog:

2020-11-04

  • Bugfix

2020-08-03