bastardijke/yii2-reeljs

jQuery Reel widget for Yii2.

Installs: 75

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Type:yii2-extension

0.1.0 2018-10-31 11:38 UTC

This package is auto-updated.

Last update: 2024-04-29 04:19:23 UTC


README

Renders a jQuery Reel plugin widget

Installation

The preferred way to install this extension is through composer.

Either run

composer require bastardijke/yii2-reeljs:*

or add

"bastardijke/yii2-reeljs" : "*"

to the require section of your application's composer.json file.

Usage

Please, check jQuery Reel documentation for the different options supported by the plugin.

use bastardijke\reeljs\ReelJs;

$imageList = [
	'images/1.jpg',
	'images/2.jpg',
	'images/3.jpg',
	'images/4.jpg',
];

<?= ReelJs::widget([
    'options' => [
        'src' => $imageList[0], // Required. Source for first image.
    ],
    'clientOptions' => [
        'images' => implode( ',' , $imageList ),
        'speed' => 0.3,
        'shy' => "true",
    ], 
]);
?>