Yii2 Counter-Up ¶
AssetBundle for jQuery Counter-Up Plugin https://github.com/NawaraGFX/Counter-Up
Installation ¶
Composer ¶
composer require --prefer-dist "ayrozjlc/yii2-counterup:*"
or add
"ayrozjlc/yii2-counterup": "dev-master"
to the `
require`
section of your composer.json
file.
Usage ¶
in view (for example: `
@app/views/layouts/main.php`
)
// ...
use ayrozjlc\counterup\CounterUpAsset;
// ...
CounterUpAsset::register($this);
or add to your `
assets/AppAsset.php`
public $depends = [
// ...
'\ayrozjlc\counterup\CounterUpAsset',
];
Add the class "counter" to the number that will be given the animation:
<span class="counter"> 1000 </ span>
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.