oonne / yii2-scroll-to-top
A Yii 2 widget to add scroll-to-top button.
Installs: 1 331
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
README
A Yii2 widget to add scroll-to-top button. Base on the .animate jQuery function.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist oonne/yii2-scroll-to-top "*"
or add
"oonne/yii2-scroll-to-top": "*"
to the require section of your composer.json
file.
Usage
<?= \oonne\scrollTop\ScrollTop::widget() ?>
<?php use oonne\scrollTop\ScrollTop; ?> <?= ScrollTop::widget([ 'options' => 'custom-css class-name' ]); ?>
<?php use oonne\scrollTop\ScrollTop; ?> <?= ScrollTop::widget([ 'tagContent' => '<i class="top-icon"></i>', 'options' => 'custom-css class-name', ]); ?>