1.0.1 • Published 9 years ago

lazy-embeds v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

SYNOPSIS

Load embeds/iframes lazily, only when they're in viewport.

Build Status

USAGE

Setup:

<div class="container">
  <iframe class="lazy-embed" data-src="http://iframe.url"></iframe>
</div>
var lazyEmbeds = require('lazy-embeds');
var container = document.querySelector('.container');
lazyEmbeds.addContainer(container);

window.addEventListener('scroll', _.debounce(lazyEmbeds.test, 50));

##LICENSE

MIT

1.0.1

9 years ago

1.0.0

9 years ago

0.1.0

9 years ago