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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -