npm.io
1.1.1 • Published 7 years ago

js-responsive-waterfall

Licence
MIT
Version
1.1.1
Deps
0
Size
5 kB
Vulns
0
Weekly
0
  1. This is a js function includes css + div + promise that contains waterfall flow layout
  2. load item that includes image(promise) one by one, pass if image onerror
  3. Simple to use pass a params data to function waterfall
  4. Responsive layout mobile pc pad
  5. If your browser doesn't support promise, please instal promise-polyfill

Installation

npm install js-responsive-waterfall --save
import { waterfall } from 'js-responsive-waterfall'
<script src="https://unpkg.com/js-responsive-waterfall@1.0.8/dist/waterfall.min.js"></script>

Usage

<ul id="container"></ul>

let list = [{ url: 'demo.png' }];
waterfall(list, 'container');
Customize configuration

See Configuration Reference.

Keywords