arif / yii2-magnific-popup
JQuery magnific popup widget
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 5
Language:JavaScript
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-02-10 15:11:00 UTC
README
Widget is under development
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).
Installing
composer require arif/yii2-magnific-popup "master-dev"
Simple usage
in view file
<a href="original.jpg" title="Caption text"><img src="/thumb_img.jpg" alt="Alt"></a>
use arif\magnificPopup\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' //'fade', 'with-zoom', 'zoom-in', 'newspaper', 'move-horizontal', 'move-from-top', '3d-unfold', 'zoom-out' ] );