2017 © Pedro Peláez
 

yii2-extension yii2-fancybox2

FancyBox2 Widget for Yii framework

image

alejka/yii2-fancybox2

FancyBox2 Widget for Yii framework

  • Saturday, February 28, 2015
  • by Alejka
  • Repository
  • 1 Watchers
  • 1 Stars
  • 41 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Fancybox2 Widget for Yii2

Yii2 extension for fancyapps.com/fancybox, (*1)

Installation

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)

Usage

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();
        }",
    ],
]);

The Versions

28/02 2015

dev-master

9999999-dev

FancyBox2 Widget for Yii framework

  Sources   Download

CC BY-NC 3.0

The Requires

 

by Aleksey Samokhvalov

extension yii2 widget fancybox2