A small, simple, and fast DOM helper library
Want to see pretty graphs? Log in now!
npm install doc-js
|53||downloads in the last week|
|139||downloads in the last month|
|Last Published By|
|Version||0.4.7 last updated a month ago|
|Dependents (7)||barrel-roller, flaps, gaffa, gaffa-fileinput, grabetha, jef, panner|
a small, simple, and fast DOM helper library
A few commonly used dom traverstal and event binding techniques are not easy to write in pure DOM, this provides a simple way to do them.
doc can be used very much like jQuery:
var doc = require('doc-js'); doc(target); // NodeList
where 'target' can be a CSS selector, a HTMLElement, or a list of elements, eg:
doc('.things'); // List of nodes that have the class 'things'
There are two versions of every function; a legacy way, and a fluent way.
Legacy way example:
Fluent way example:
Easy to use
less than 1k minified
about 1.3k min'd and gzipped (I added features..)