Implementation for yii2 framework of jssor/jquery-slider ¶
This is a fork of jssor/jquery-slider with an additionnal SliderWidget and SliderAsset for yii framework
Installation ¶
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require "claudejanz/query-slider": "dev-master"
or add
"claudejanz/query-slider": "dev-master"
to the require section of your composer.json
file.
Usage ¶
use claudejanz\jquerySlider\widgets\SliderWidget;
use yii\web\JsExpression;
SliderWidget::begin([
'responsive' => true,
'options'=>['style'=>'position: relative; top: 0px; left: 0px; width: 600px; height: 300px;'],
'pluginOptions' => [
'$AutoPlay' => true,
'$AutoPlayInterval' => 6000,
'$SlideDuration' => 800,
'$SlideshowOptions' => [
'$Class' => new JsExpression('$JssorSlideshowRunner$'),
'$Transitions' => [
['$Duration' => 700, '$Opacity' => 2, '$Brother' => ['$Duration' => 1000, '$Opacity' => 2]]
]
]
]
]);
echo '<div u="slides" style="cursor: move; position: absolute; overflow: hidden; left: 0px; top: 0px; width: 600px; height: 300px;">
<div><img u="image" src="images/01.jpg" /></div>
<div><img u="image" src="images/02.jpg" /></div>
</div>';
SliderWidget::end();
More about plugin options on: http://www.jssor.com
Not working for me
I get the error:
Could not find package dev-master at any version for your minimum-stability
(dev). Check the package spelling or your minimum-stability
above is without the "j", the correct is:
claudejanz/jquery-slider
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.