Categories

Featured templates

JS Animated. How to use CountTo – Counter

Celine Jade February 9, 2017
Rating: 5.0/5. From 2 votes.
Please wait...

HTML Website Templates use countTo.js extension to add counters to webpage. This time we’ll learn how to manage them.

There might be a separate page (html file) for displaying counters or progress bars. Let’s open the progress-bars.html file to edit it. In our case these are Buses, Miles, Drivers and Passengers.

How to use CountTo - Counter.1

Creating new counter

In order to create a new counter the following HTML code should be added to the page’s content:


where, data-from attribute is responsible for counter origin, and data-to attribute – for the final result that will be displayed on page.

Counter working time correction

In order to change speed of counting you should add the data-speed attribute and set time interval of the counting, in milliseconds.

For example,


How to use CountTo - Counter.2

Counter update interval

In order to change time interval between counter updates you should add data-refresh-interval attribute and set needed time interval in milliseconds.

For example,

How to use CountTo - Counter.3

Feel free to check the detailed video tutorial below:

JS Animated. How to use CountTo – Counter
This entry was posted in JS Animated tutorials and tagged counter, countto, JS Animated. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket