1.0.3 • Published 8 years ago

nodes-each v1.0.3

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

nodes-each

Loop through a NodeList (e.g. the result of querySelectorAll).

Install

npm i --save nodes-each

nodesEach (NodeList, callback, scope)

var nodesEach = require('nodes-each');

nodesEach( document.querySelectorAll('.someSelector'), function (idx, el) {
      console.log('index: ' + idx, 'element: ' + el);
   }, this);

License

MIT, see LICENSE.md for details.