Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anthonyshort/dom-walk

Walk down a DOM tree and run a callback on each element
https://github.com/anthonyshort/dom-walk

Last synced: 24 days ago
JSON representation

Walk down a DOM tree and run a callback on each element

Awesome Lists containing this project

README

        

# dom-walk

Walk down a DOM tree

## Installation

Install with [component(1)](http://component.io):

$ component install anthonyshort/dom-walk

## API

var walk = require('walk');

walk(document.body, function(el, attrs, next){
// Process the node
next(); // Next node
}, function(){
// Walked all nodes
});

## License

MIT