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

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

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