Get parent element node

Getting the parent DOM node of an element.


Selecting the parent node of an element via cross-browser safe DOM method:

var el = document.querySelector('div');
var parent = el.parentNode;

Feedback