lazy-masonry
A Simple Lazy Masonry for JavaScript
Getting Started
Installation
-
with NPM
$ npm install lazy-masonry
Demo
How to use it
It's a pretty easy to use this library. This is the usage example :
// for the first add this div tag inside body <div id="lazy-masonry"></div> // add this line only if installed via npm ; // creating object masonry, you can pass options to itvar masonry = 'lazy-masonry' images: 5 width: 800 animateable: true animationType: 'from-top' animationDuration: '1s'; animation types are "from-top" "from-top-left" "from-top-right" "from-right" "from-left" "from-bottom" // now you have masonry object and can add images to it // this will add one element masonry; // this will add all elements of arraymasonry; // you can listen to every click on elementsmasonry;
Contributors ✨
Rafael Muradyan 💻 |