xutl/yii2-back-to-top-widget

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

Installs: 4 146

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

1.0.0 2017-10-11 03:05 UTC

This package is auto-updated.

Last update: 2022-05-10 21:46:57 UTC


README

A Yii2 widget to add back-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 xutl/yii2-back-to-top-widget "*"

or add

"xutl/yii2-back-to-top-widget": "*"

to the require section of your composer.json file.

Usage

<?= \xutl\backtop\BackTop::widget() ?>
<?php use xutl\backtop\BackTop; ?>
<?= BackTop::widget([
    'options' => 'custom-css class-name'
]); ?>
<?php use xutl\backtop\BackTop; ?>
<?= BackTop::widget([
    'tagContent' => '<i class="top-icon"></i>',
    'options' => 'custom-css class-name',
]); ?>