lazyload.js
v1.0.2
Published
img lazyload
Downloads
16
Readme
lazyload.js
lazy load imgs demo
support
- √ ie8 ~ ie11
- √ edge
- √ firefox4+
- √ chrome26+
usage
<img data-imgsrc="https://avatars2.githubusercontent.com/u/15724170?v=4&s=40">
<script src="./lazyload.min.js"></script>
<script>
lazyload()
</script>
options
{
cover: '',
duration: 300,
coverColor: 'rgba(0,0,0,.4)',
onLoadEnd: function (element, index) {},
onLoadError: function (element, index) {},
onLoadStart: function (element, index) {},
defaultImg: 'data:image/png;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='
}