loveorigami / yii2-magnific-popup
This widget is wrapper for awesome jQuery plugin Magnific Popup
Installs: 8 631
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/magnific-popup: 1.1.*
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-21 21:04:14 UTC
README
This widget is wrapper for awesome jQuery plugin Magnific Popup By Dmitry Semenov http://dimsemenov.com/plugins/magnific-popup/
Magnific Popup is a responsive lightbox & dialog script with focus on performance and providing best experience for user with any device (for jQuery or Zepto.js).
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require --prefer-dist loveorigami/yii2-magnific-popup "@dev"
or add
"loveorigami/yii2-magnific-popup": "@dev"
to the require section of your composer.json file.
Simple usage
in view file
<a href="original.jpg" title="Caption text"><img src="/thumb_img.jpg" alt="Alt"></a>
use lo\widgets\magnific\MagnificPopup; echo MagnificPopup::widget( [ 'target' => '#mpup', 'options' => [ 'delegate'=> 'a', ] ] );
for gallery
<div class="col-md-6" id="mpup"> <a href="original.jpg" title="Caption for first"><img src="/thumb_img.jpg" alt="Alt"></a> <a href="original2.jpg" title="Caption for second"><img src="/thumb_img2.jpg" alt="Alt"></a> </div>
echo MagnificPopup::widget( [ 'target' => '#mpup', 'options' => [ 'delegate'=> 'a', ], 'effect' => 'with-zoom' //for zoom effect ] );