A question: How to find out which parent contains an attribute? Example:
<div custom-attribute>
<div>
<div>
<div>
<div><p>some text</p></div>
</div>
</div>
</div>
</div>
I can't know exactly where this attribute will be applied and on which element.
I need to iterate through all the parents from the <p>
element.
Without jquery