oonne/yii2-scroll-to-top

A Yii 2 widget to add scroll-to-top button.

Installs: 909

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.4 2017-08-09 00:51 UTC

This package is auto-updated.

Last update: 2024-05-18 17:26:51 UTC


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',
]); ?>