dev-master
9999999-devFancyBox2 Widget for Yii framework
CC BY-NC 3.0
The Requires
by Aleksey Samokhvalov
extension yii2 widget fancybox2
FancyBox2 Widget for Yii framework
Yii2 extension for fancyapps.com/fancybox, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require "alejka/yii2-fancybox2" "*"
or add, (*4)
"alejka/yii2-fancybox2" : "*"
to the require section of your application's composer.json
file., (*5)
use alejka\fancybox2\FancyBox; FancyBox::widget([ 'target' => '.fancybox', 'options' => [ 'loop' => false, 'padding' => 0, 'margin' => [15, 15, 60, 15], 'afterLoad' => new JsExpression(" function() { var list = $('#links'); if (!list.length) { list = $(' < ul id=\"links\">'); for (var i = 0; i < this.group.length; i++) { $('<li data-index=\"' + i + '\"><label></label></li>').click(function() { $.fancybox.jumpto( $(this).data('index'));}).appendTo( list ); } list.appendTo('body'); } list.find('li').removeClass('active').eq( this.index ).addClass('active'); } "), 'beforeClose' => "function() { $('#links').remove(); }", ], ]);
FancyBox2 Widget for Yii framework
CC BY-NC 3.0
extension yii2 widget fancybox2