npm.io
2.0.3 • Published 10 years ago

leveldiv

Licence
Version
2.0.3
Deps
1
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

Leveldiv

Leveldiv is a small library to make HTML columns have the same height.

Usage

$ npm install leveldiv --save
var leveldiv = require('leveldiv');

leveldiv.set( {
	debounce: 300,
	responsive: 500,
	debug: true,
	row: '[data-level-row]',
	column: '[data-level-column]'
});

Example HTML

<section data-level-row>
	<article data-level-column>
		<p>Lorem ipsum</p>
	</article>
	<article data-level-column>
		<p>Lorem ipsum</p>
	</article>
	<article data-level-column>
		<p>Lorem ipsum</p>
	</article>
</section>

Methods

leveldiv.refresh();
Options

Debounce: type Integer default false required no
Let the window resize event debounce for better performance.

Responsive: type Integer default false required no
Stop calculating and setting the height at a certain width.

Debug: type Boolean default false required no
Console debug

Row: type char default false required no
By default leveldiv uses the data attribute "level-row" but you can also use a classname

Column: type char default false required no
By default leveldiv uses the data attribute "level-column" but you can also use a classname

Install the example
$ git clone git@github.com:ovdsteen/leveldiv.git
$ cd example
$ npm install
$ grunt