/ Published in: JavaScript
A JS function that returns the next element of a node. Argument: The node you want to know next element.
From book Dom Scripting by Jeremy Keith.
Expand |
Embed | Plain Text
function getNextElement(node) { if(node.nodeType == 1) { return node; } if (node.nextSibling) { return getNextElement(node.nextSibling); } return null; }
You need to login to post a comment.
