In pure javascript how do you transverse up a DOM element and target the parent? -
this question has answer here:
without using jquery , plain javascript. how 1 select parent of child element?
example:
<div> <p> <em class="stuff">abc</em> </p> </div>
how select parent div container via class stuff?
its in pure javascript
element.parentnode
Comments
Post a Comment