bigpaulie/yii2-fancybox
最新稳定版本:1.0.0
Composer 安装命令:
composer require bigpaulie/yii2-fancybox
包简介
Yii2 FancyBox extension
README 文档
README
Yii2 FancyBox 2 extension
FancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. It is built on the top of the popular JavaScript framework jQuery and is both easy to implement and a snap to customize.
Form more information on how to use FancyBox please go to their website http://fancyapps.com/fancybox/
Install
The preferred way of installing is through composer
composer require --prefer-dist bigpaulie/yii2-fancybox "dev-master"
OR add to composer.json
"bigpaulie/yii2-fancybox": "dev-master"
Example usage :
use bigpaulie\fancybox\FancyBox;
Images
echo FancyBox::widget([ 'type' => 'image', 'item' => [ 'href' => 'url_to_thumbnail', 'src' => 'url_to_big_image', ], ]);
Inline content
echo FancyBox::widget([ 'type' => 'inline', 'item' => [ 'href' => '#myInline', 'text' => 'click here', ], ]);
<div style="display:none;"><p id="#myInline">This is my inline content !</p></div>
Ajax
echo FancyBox::widget([ 'type' => 'ajax', 'item' => [ 'href' => 'http://example.com/ajax.php', 'text' => 'click here', ], ]);
OR
echo FancyBox::widget([ 'type' => 'ajax', 'item' => [ 'href' => Url::to(['site/ajax']), 'text' => 'click here', ], ]);
Media
echo FancyBox::widget([ 'type' => 'media', 'item' => [ 'href' => 'https://www.youtube.com/watch?v=YE7VzlLtp-4', 'text' => 'click here', ], 'clientOptions' => [ 'helpers' => [ 'media' => true, ], ], ]);
统计信息
- 总下载量: 1.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-30