1.0.10 • Published 8 years ago

cascade-layout v1.0.10

Weekly downloads
10
License
MIT
Repository
github
Last release
8 years ago

Cascade.js

Simple minimalistic plugin for masonry-like layout. Lightweight (3kb minified) jQuery-free library, a successor of kudago/waterfall.js.

Demo

Usage

Browserify:

$ npm install cascade-layout
var cascade = require('cascade-layout');

You can also use it with native JS:

var cascade = new Cascade(element, options);

Or with jQuery:

$(elem).cascade(options);

Options

{
	childrenSelector: null, //children selector (simply children if null)
	minWidth: 300, //minimal width of the children
	autoResize: true //resize automatically on resize
}

Methods

When using VanillaJS or CommonJS forms you can call the instance's reflow method to make Cascade redraw the elements

var cascadeItem = new Cascade(...);
cascadeItem.reflow() //reposition cascade elements
1.0.10

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago