Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 668 Bytes

README.md

File metadata and controls

38 lines (26 loc) · 668 Bytes

Yii2 Lazy Extension

This is Yii2 wrapper class for http://jquery.eisbehr.de/lazy/.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist cluwong/yii2-lazy "*"

or add

"cluwong/yii2-lazy": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php 
use cluwong\lazy\Lazy
Lazy::widget(); 
?>
<img class="lazy" data-src="/path/to/image.jpg" />

For more examples see http://jquery.eisbehr.de/lazy/#examples.