|
@@ -30,12 +30,6 @@ The results can be seen in the example below.
|
|
|
|
|
|
Set the `duration` to determine how long the animation should take. By default, the duration is set to 2 seconds, but you can modify it as you wish.
|
|
Set the `duration` to determine how long the animation should take. By default, the duration is set to 2 seconds, but you can modify it as you wish.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"duration":4}'>30000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how the duration affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup='{"duration":4}'>30000</h1>
|
|
<h1 data-countup='{"duration":4}'>30000</h1>
|
|
@@ -47,11 +41,6 @@ Look at the example below to see how the duration affects the animation.
|
|
|
|
|
|
By default the countup will start from zero. If you want to set a different start value use `startVal`.
|
|
By default the countup will start from zero. If you want to set a different start value use `startVal`.
|
|
You can also set the start value to be greater than the final value, so that it counts down instead of up.
|
|
You can also set the start value to be greater than the final value, so that it counts down instead of up.
|
|
-
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"startVal":12345}'>30000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
To see how the starting value affects the animation, look at the example below.
|
|
To see how the starting value affects the animation, look at the example below.
|
|
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
@@ -64,12 +53,6 @@ To see how the starting value affects the animation, look at the example below.
|
|
|
|
|
|
Set how many decimal numbers should be displayed using `decimalPlaces`. By default, the number of decimal places is set to 0.
|
|
Set how many decimal numbers should be displayed using `decimalPlaces`. By default, the number of decimal places is set to 0.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"decimalPlaces":1}'>3.123</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how the number of decimal places affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup>3.123</h1>
|
|
<h1 data-countup>3.123</h1>
|
|
<h1 data-countup='{"decimalPlaces":1}'>3.123</h1>
|
|
<h1 data-countup='{"decimalPlaces":1}'>3.123</h1>
|
|
@@ -82,12 +65,6 @@ Look at the example below to see how the number of decimal places affects the an
|
|
|
|
|
|
Disable easing using `"useEasing": false`. Easing is set to `true` by default, so that the animation speed changes over the course of its duration. Easing can be disabled to make the animation linear.
|
|
Disable easing using `"useEasing": false`. Easing is set to `true` by default, so that the animation speed changes over the course of its duration. Easing can be disabled to make the animation linear.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"useEasing": false}'>30000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how easing affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup='{"useEasing": false}'>30000</h1>
|
|
<h1 data-countup='{"useEasing": false}'>30000</h1>
|
|
@@ -98,12 +75,6 @@ Look at the example below to see how easing affects the animation.
|
|
|
|
|
|
Disable grouping using `"useGrouping": false`. Grouping is set to `true` by default, so that the number is displayed with a separator.
|
|
Disable grouping using `"useGrouping": false`. Grouping is set to `true` by default, so that the number is displayed with a separator.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"useGrouping": false}'>30000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Example below shows how grouping affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup>30000</h1>
|
|
<h1 data-countup='{"useGrouping": false}'>30000</h1>
|
|
<h1 data-countup='{"useGrouping": false}'>30000</h1>
|
|
@@ -114,12 +85,6 @@ Example below shows how grouping affects the animation.
|
|
|
|
|
|
You can change the default separator using `separator` and specifying the one you wish to use.
|
|
You can change the default separator using `separator` and specifying the one you wish to use.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"separator":" "}'>3000000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-This example shows how the separator affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup>3000000</h1>
|
|
<h1 data-countup>3000000</h1>
|
|
<h1 data-countup='{"separator":" "}'>3000000</h1>
|
|
<h1 data-countup='{"separator":" "}'>3000000</h1>
|
|
@@ -130,12 +95,6 @@ This example shows how the separator affects the animation.
|
|
|
|
|
|
You can change the default decimal separator using `decimal` and specifying the one you wish to use.
|
|
You can change the default decimal separator using `decimal` and specifying the one you wish to use.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"decimal":","}'>3.12</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how the decimal separator affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup='{"decimalPlaces":2}'>3.12</h1>
|
|
<h1 data-countup='{"decimalPlaces":2}'>3.12</h1>
|
|
<h1 data-countup='{"decimalPlaces":2,"decimal":","}'>3.12</h1>
|
|
<h1 data-countup='{"decimalPlaces":2,"decimal":","}'>3.12</h1>
|
|
@@ -146,12 +105,6 @@ Look at the example below to see how the decimal separator affects the animation
|
|
|
|
|
|
Set the countup prefix using `prefix` and specifying the prefix you want to add, for instance a currency symbol.
|
|
Set the countup prefix using `prefix` and specifying the prefix you want to add, for instance a currency symbol.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"prefix":"$"}'>30000</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how the prefix affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup='{"prefix":"$"}'>30000</h1>
|
|
<h1 data-countup='{"prefix":"$"}'>30000</h1>
|
|
<h1 data-countup='{"prefix":"€"}'>30000</h1>
|
|
<h1 data-countup='{"prefix":"€"}'>30000</h1>
|
|
@@ -162,12 +115,6 @@ Look at the example below to see how the prefix affects the animation.
|
|
|
|
|
|
Set the countup suffix using `suffix` and specifying the suffix you want to add, for instance a percentage symbol.
|
|
Set the countup suffix using `suffix` and specifying the suffix you want to add, for instance a percentage symbol.
|
|
|
|
|
|
-```html
|
|
|
|
-<h1 data-countup='{"suffix":"%"}'>300</h1>
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-Look at the example below to see how the suffix affects the animation.
|
|
|
|
-
|
|
|
|
{% capture html -%}
|
|
{% capture html -%}
|
|
<h1 data-countup='{"suffix":"%"}'>300</h1>
|
|
<h1 data-countup='{"suffix":"%"}'>300</h1>
|
|
<h1 data-countup='{"suffix":"‰"}'>300</h1>
|
|
<h1 data-countup='{"suffix":"‰"}'>300</h1>
|