🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

unveil2

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unveil2

unveil2.js is a lazy load library

2.0.8
latest
Source
npm
Version published
Maintainers
1
Created
Source

Travis Code Climate npm Bower

unveil2.js

A very lightweight plugin to lazy load images for jQuery
Based on luis-almeida/unveil.

Getting started

Install unveil2.js by downloading a copy of jquery.unveil2.min.js and add it to your page after jQuery:

<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="jquery.unveil2.min.js"></script>

And call the unveil plugin on the images you want to be lazily loaded:

$('img').unveil();

Note: If you load scripts at the bottom of the page, you don't have to wait for $.ready.

That's all folks!

More examples

CSS background, retina images, breakpoints and more: see online examples.

More configuration options

For a complete list of options, see API section.

Cross-browser tests

Sauce Labs

License

MIT

Keywords

jquery lazy load

FAQs

Package last updated on 12 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts