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

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -