ayrozjlc/yii2-counterup

AssetBundle for jQuery Counter-Up Plugin https://github.com/NawaraGFX/Counter-Up

Installs: 160

Dependents: 0

Suggesters: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v0.1 2016-10-25 05:56 UTC

README

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>