chrisb34/yii2-lazyload
Composer 安装命令:
composer require chrisb34/yii2-lazyload
包简介
Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress)
关键字:
README 文档
README
Yii2 helper to lazy load images and/or to convert image captions into div markups (like wordpress)
*Note: This project is still in DEV and is therefore not fully tested / stable
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist chrisb34/yii2-lazyload "*"
or add
"chrisb34/yii2-lazyload": "*"
to the require section of your composer.json file.
Usage
In a view add the lazyload widget as follows;
use chrisb34/lazyload; echo LazyLoad::widget([ // the data model 'model' => $model // the model attribute that holds the html to convert 'contentProperty' => 'attributeName', ... other config options - see source code ])
see http://yii2.chris-backhouse.com for more details
- Thanks to
This uses the jquery plugins:
Lazy Load Plugin for jQuery - Mika Tuupola http://www.appelsiini.net/projects/lazyload
jCaption: jQuery Image Captions with Customizable Markup, Style and Animation - Joel Sutherland http://www.newmediacampaigns.com/blog/jcaption-a-jquery-plugin-for-simple-image-captions#download
统计信息
- 总下载量: 84
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-10