# Lazy Load Plugin for jQuery
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](http://developer.yahoo.com/yui/imageloader/) Utility by Matt Mlinac.
## How to Use?
Lazy Load depends on jQuery. Include them both in end of your HTML code:
```html
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.lazyload.js" type="text/javascript"></script>
```
You must alter your HTML code. URL of the real image must be put into data-original attribute. It is good idea to give Lazy Loaded image a specific class. This way you can easily control which images plugin is binded to. Note that you should have width and height attributes in your image tag.
```html
<img class="lazy" data-original="img/example.jpg" width="640" height="480">
```
then in your code do:
```js
$("img.lazy").lazyload();
```
This causes all images of class lazy to be lazy loaded.
More information on [Lazy Load](http://www.appelsiini.net/projects/lazyload) project page.
## Install
You can install with [bower](http://bower.io/) or [npm](https://www.npmjs.com/).
```sh
$ bower install jquery.lazyload
$ npm install jquery-lazyload
```
# License
All code licensed under the [MIT License](http://www.opensource.org/licenses/mit-license.php). All images licensed under [Creative Commons Attribution 3.0 Unported License](http://creativecommons.org/licenses/by/3.0/deed.en_US). In other words you are basically free to do whatever you want. Just don't remove my name from the source.
没有合适的资源?快使用搜索试试~ 我知道了~
jquery_lazyload-master.zip
共33个文件
html:11个
jpg:6个
js:5个
需积分: 3 7 下载量 50 浏览量
2015-10-24
11:43:29
上传
评论
收藏 782KB ZIP 举报
温馨提示
jquery_lazyload-master.zip 类似新浪微博 的图片懒加载,非常实用jquery_lazyload-master.zip 类似新浪微博 的图片懒加载,非常实用jquery_lazyload-master.zip 类似新浪微博 的图片懒加载,非常实用jquery_lazyload-master.zip 类似新浪微博 的图片懒加载,非常实用
资源推荐
资源详情
资源评论
收起资源包目录
jquery_lazyload-master.zip (33个子文件)
jquery_lazyload-master
enabled_container.html 6KB
img
grey.gif 43B
bmw_m1_hood.jpg 141KB
viper_corner.jpg 136KB
corvette_pitstop.jpg 138KB
viper_1.jpg 136KB
white.gif 43B
bmw_m1_side.jpg 145KB
bmw_m3_gt.jpg 160KB
transparent.gif 43B
package.json 876B
enabled_wide_container.html 6KB
CHANGELOG.textile 7KB
enabled_background.html 6KB
jquery.lazyload.js 9KB
enabled_ajax.html 5KB
jquery.lazyload.min.js 3KB
disabled.html 5KB
lazyload.jquery.json 1KB
jquery.scrollstop.min.js 796B
enabled.html 6KB
CONTRIBUTING.md 2KB
Gruntfile.js 1KB
enabled_gazillion.html 27KB
jquery.scrollstop.js 2KB
enabled_wide.html 6KB
.gitignore 12B
enabled_noscript.html 7KB
enabled_fadein.html 6KB
README.md 2KB
.jshintrc 210B
bower.json 549B
enabled_timeout.html 6KB
共 33 条
- 1
资源评论
JAVA服务端研发知识图谱
- 粉丝: 12
- 资源: 194
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功