Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

plugin-lazyload

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plugin-lazyload

上拉加载更多

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

lazyload

功能

懒加载图片, 只加载可视区内的图片
对需要懒加载的图片添加class为lazy-image,data-src为懒加载图片路径

安装

npm install plugin-lazyload --save-dev

Example

<body id="app">
    <div>
        <img class="lazy-image" data-src="1.png"/>
    </div>
</body>
<script>
new LazyLoad({

})
</script>

Options

Namedefaultdescription
lazyLoadingClasslazy-image懒加载图片的class
lazyStatusLoadingClasslazy-loading懒加载图片加载中的class
lazyStatusLoadedClasslazy-loaded懒加载图片加载完成后的class

##Methods

stop();
start();

Keywords

pull

FAQs

Package last updated on 29 Mar 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