Stylish Incremental Counter Plugin with jQuery - Download Stylish Incremental Counter Plugin with jQuery

Download Stylish Incremental Counter Plugin with jQuery

Posted on

This time I will share jQuery Plugin and tutorial about Stylish Incremental Counter Plugin with jQuery, hope it will help you in programming stack.

Stylish Incremental Counter Plugin with jQuery - Download Stylish Incremental Counter Plugin with jQuery
File Size: 16.9 KB
Views Total: 9857
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Incremental Counter is jQuery plugin used for creating a stylish increasing counter that counts up from zero to the number you specify in a DOM element. The animation speed will auto update depending on the remaining numbers.

Basic usage:

1. Add the latest version of jQuery library and the jQuery incremental counter plugin to the webpage.

1 <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
2 <script src="jquery.incremental-counter.js"></script>

2. Specify the number you want to count up to using the data-value attribute.

1 <div class="incremental-counter" data-value="2000"></div>

3. Style the counter with your own CSS styles.

01 .incremental-counter .num {
02   background: #f8f8f8 none repeat scroll 0 0;
03   border: 1px solid #fff;
04   border-radius: 4px;
05   color: #00aae6;
06   display: inline-block;
07   height: 64px;
08   line-height: 62px;
09   margin: 0 4.5px;
10   position: relative;
11   text-align: center;
12   top: -1px;
13   width: 50px;
14   font-size: 45px;
15   font-size: 3.72625em;
16   font-weight: 700;
17   box-shadow: 0 2px 3px rgba(0, 0, 0, 0.45);
18   font-family: "Open Sans", Arial, Helvetica, sans-serif;
19 }
20  
21 .incremental-counter .num::before {
22   background: #00aae6;
23   content: "";
24   display: block;
25   height: 1px;
26   left: -1px;
27   margin: -0.5px 0 0;
28   position: absolute;
29   right: -1px;
30   top: 50%;
31   width: auto;
32 }

4. Active the counter on page load.

1 $(".incremental-counter").incrementalCounter();

5. Config the length of the number.

1 $(".incremental-counter").incrementalCounter({
2   "digits": 4
3 });

Change log:

2017-05-20

  • add digits options and auto digits value

2015-12-30

  • add digits options and auto digits value

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

source : jqueryscript.net