Skip to content

corpsepk/yii2-magnific-popup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-magnific-popup

=============== jQuery plugin page http://dimsemenov.com/plugins/magnific-popup/

Installation

Update composer.json add to "require" section

"corpsepk/yii2-magnific-popup" : "~0.1@dev"

Update composer.json add to "repositories" section

{
    "type": "git",
    "url": "https://github.com/corpsepk/yii2-magnific-popup.git"
}

How to use

More settings look at Magnific popup documentation http://dimsemenov.com/plugins/magnific-popup/documentation.html

use corpsepk\magnificPopup\MagnificPopup;

MagnificPopup::widget([
    'target' => '.media-widget .photo-grid a',
    'options' => [
        'type' => 'ajax',
        'closeOnBgClick' => true,
        'closeBtnInside' => true,
        'overflowY' => 'scroll',
        'disableOn' => 600,
        'tLoading' => 'Загрузка...',
        'gallery' => [
            'enabled' => true,
            'navigateByImgClick' => true,
            'preload' => ['[0,1]'],
            'tCounter' => '<span class="mfp-counter">%curr% из %total%</span>',
        ],
        'ajax' => [
            'settings' => ['type' => 'POST'],
        ],
    ]
]);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published