yii2-widget-lazyload Wrapper of lazyload jquery library

  1. Installation
  2. Usage
  3. Resources

Wrapper of [lazy loading](http://www.appelsiini.net/projects/lazyload ) jquery library.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist toriphes/yii2-widget-lazyload "*"

or add

"toriphes/yii2-widget-lazyload": "*"

to the require section of your composer.json file.

Usage

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

use toriphes\lazyload\LazyLoad;

echo LazyLoad::widget(['src' => 'url/to/your/image.jpg']);

//enable fallback for non JavaScript user
echo LazyLoad::widget(['src' => 'url/to/your/image.jpg', 'fallback' => true]);

Resources

0 0
3 followers
0 downloads
Yii Version: 2.0
License: BSD-2-Clause
Category: User Interface
Developed by: toriphes
Created on: Nov 24, 2015
Last updated: 8 years ago

Related Extensions