/ Published in: JavaScript
![](/img/icon_sav.png?v3)
Useful function for CSS DOM, returns the next element after the selected node. So you could style the element directly after a h1 element for example.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getNextElement(node) { if(node.nodeType == 1){ return node; } if(node.nextSibling) { return getNextElement(node.nextSibling) } return null; }
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)