Skip to content

zanjs/lanjs

Repository files navigation

Lanjs

<body>

  <img src="img/loading.gif" Lan="img/photo.jpg">

  <script src="dist/lan.js"></script>
  <script>
  Lan.init({
    callback: function (element, op) {
      console.log(element, 'has been', op + 'ed')
    }
  });

  // Lan.render(); 
  // 也可用于非滚动回调
  // is also available for non-scroll callbacks
  </script>
</body>

default

offset: 100,
throttle: 250,
unload: false,
callback: function

License

MIT

About

Lazy-loading with lan-* attributes, offset and throttle options

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published