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

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

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -