Get the next Node Element, with optional container restriction.
$ npm install --save next-node
<div id="a1">
<div id="b1"></div>
<div id="b2"></div>
</div>
<div id="c1"></div>
const nextNode = require('next-node');
nextNode(a1);
//=> b1
nextNode(b1);
//=> b2
nextNode(b2);
//=> c1 (container not specified)
nextNode(b2, a1);
//=> null (container specified)
Type: Node
The initial ("needle") Node element.
Type: Node
Default: null
The container ("haystack") Node element. Specifying a container
will limit results to its children only.
MIT © Luke Edwards