jquery.lazyload.cjs

1.9.8-beta.1 • Public • Published

Lazy Load Plugin for jQuery on CommonJS Module Definition

Lazy Load delays loading of images in long web pages. Images outside of viewport wont be loaded before user scrolls to them. This is opposite of image preloading.

Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images. In some cases it can also help to reduce server load.

Lazy Load is inspired by YUI ImageLoader Utility by Matt Mlinac.

How to Use?

Lazy Load depends on jQuery. Here's how to include it (tested on webpack):

var $ = require('jquery')
require('jquery.lazyload.cjs')($)

then in your code do:

$("img.lazy").lazyload();

This causes all images of class lazy to be lazy loaded.

More information on Lazy Load project page.

Install

You can install with bower or npm.

$ npm install jquery.lazyload.cjs

License

All code licensed under the MIT License. All images licensed under Creative Commons Attribution 3.0 Unported License. In other words you are basically free to do whatever you want. Just don't remove my name from the source.

Package Sidebar

Install

npm i jquery.lazyload.cjs

Weekly Downloads

18

Version

1.9.8-beta.1

License

MIT

Last publish

Collaborators

  • nickmessing