1.0.3 • Published 4 years ago

spangrid v1.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

Spangrid

NPM Version NPM Downloads Linux Build

Span grid items randomly within an interval.

Usage

Assuming that you're bundling your files with a tool such as Webpack or Browserify, which allow you to "require('modules')" in the browser by bundling up all of your dependencies.

npm i spangrid
<div id="grid">
  <h1>Lorem, ipsum dolor</h1>
  <h1>Lorem, ipsum dolor</h1>  
  <h1>Lorem, ipsum dolor</h1>  
  <h1>Lorem, ipsum dolor</h1>
</div>
const spangrid = require('spangrid')

const grid = document.getElemnetById('grid')
const minSpan = 15 //percentage 
const maxSpan = 35 //percentage 
const cols = 4

spangrid(grid, minSpan, maxSpan, cols)
1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago