loveorigami/yii2-magnific-popup
最新稳定版本:1.0
Composer 安装命令:
composer require loveorigami/yii2-magnific-popup
包简介
This widget is wrapper for awesome jQuery plugin Magnific Popup
README 文档
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 ] );
统计信息
- 总下载量: 10.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-06