amazeui-lazyload

1.9.8 • Public • Published

Lazy Load

Forked from Lazy Load Plugin for jQuery

使用方法

首先,在页面中引入 jQuery 和 jquery.lazyload.js

<script src="jquery.js"></script>
<script src="amazeui.lazyload.js></script>

然后,修改 <img>,将图片实际地址写在 data-original 上。为方便选择,建议在要使用 Lazy Load 的图片上加统一的 class;为防止页面抖动,图片上应该添加 widthheight 属性。

<img class="lazy" data-original="img/example.jpg" width="640" height="480">

完成 HTML 设置以后,调用 Lazy Load 插件:

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

更多演示:

获取插件

直接下载

下载 Lazy Load

使用 NPM

npm install amazeui-lazyload

使用 Bower

bower 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.

Package Sidebar

Install

npm i amazeui-lazyload

Weekly Downloads

5

Version

1.9.8

License

none

Last publish

Collaborators

  • minwe