faul
v0.1.2
Published
Lazy load images and videos
Readme
Faul
Lazy load images and videos
Install
With Bower
bower install faulWith NPM
npm install faulExample Setup
Javascript
import Faul from 'faul';
// create an instance (with the defaults)
const faul = new Faul({
items: '.faul', // the selector or dom elements for the items
bg: false, // if src should be set as background-image
threshold: 0, // the threshold to load
stagger: 100, // duration for stagger (in ms)
fn: item => {}, // callback function for each individual item
});Methods
faul.set(nodeList || '.selector'); // set items
faul.destroy(); // remove the event listeners