MrRaindrop / lazyimg

image lazyloading.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lazyimg

NOTE

this lib depend on appearjs.

APIS

  • lib.img.fire()
  • lib.img.logConfig()

demo

<style>
.my-img {
  margin-bottom: 10px;
  width: 300px;
  height: 300px;
}
</style>

<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">    
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
<img class="my-img" img-src="http://gw.alicdn.com/tfscom/TB1hScdIFXXXXX7aXXXlQjeFXXX-1024-769.jpg">
    
<script>
  lib.img.fire();
</script>

About

image lazyloading.

License:MIT License


Languages

Language:JavaScript 100.0%