PHP code example of assayer-pro / yii2-scrollup-widget
1. Go to this page and download the library: Download assayer-pro/yii2-scrollup-widget library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
assayer-pro / yii2-scrollup-widget example snippets
use assayerpro\scrollup\Scrollup;
Scrollup::widget([
'theme' => Scrollup::THEME_IMAGE,
'pluginOptions' => [
'scrollText' => "To top", // Text for element
'scrollName'=> 'scrollUp', // Element ID
'topDistance'=> 400, // Distance from top before showing element (px)
'topSpeed'=> 3000, // Speed back to top (ms)
'animation' => Scrollup::ANIMATION_SLIDE, // Fade, slide, none
'animationInSpeed' => 200, // Animation in speed (ms)
'animationOutSpeed'=> 200, // Animation out speed (ms)
'activeOverlay' => false, // Set CSS color to display scrollUp active point, e.g '#00FFFF'
]
]);
'components' => [ // Check that you are inside "components" section
'assetManager' => [
'bundles' => [
'assayerpro\scrollup\ScrollupAsset' => [
'js' => [
YII_ENV_DEV ? 'jquery.scrollUp.js' : 'jquery.scrollUp.min.js',
],
],
],
],
// ... Some other components
],
php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.