3
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 the elements that are parents of .ele4
except for .not_this
(I also want the above).
I know that with the help of jQuery:
$('.ele4').parents().not('.not_this, body, html');
But I would like to make this feature only in native js. How to do?
This is Miguel! Take a look at this yesterday’s post here on the stack, I believe it’s exactly what you need :) http://answall.com/questions/136834/howto get everyone!
– fperz
@the idea of this question arose from that :)
– Sergio