/dom-walk

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

Primary LanguageJavaScript

dom-walk

Walk down a DOM tree

Installation

Install with component(1):

$ 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