Let's say I have:
<section id="ele-section1">
<div data-section="1">
<div class="not_this">
<div>
<div class="ele2">
<div id="ele3">
<div class="ele4">
<div class="child">
<!-- Conteúdo -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
I want to 'grab' all elements that are parents of .ele4
except .not_this
(I also want those above this).
I know that with the help of jQuery it could be done like this:
$('.ele4').parents().not('.not_this, body, html');
But I would like to do this feature only in native js. How to do?