I have these 3 divs
Is there a way to get the id parent
when you click on that child of child, and if yes, how?
function getParentId(el) {
//get the id "parent"
}
<div id="parent">
<div class="child">
<div class="child-of-child" onClick="getParentId(this)">
<!-- some code here -->
</div>
</div>
</div>