How would I select only the first level .block and not any of the children?
$('.block:not("Children of this here")')
<--
<div class="block"> <!-- this -->
<div class="block"> <!-- not this -->
<div class="block"> <!-- not this -->
</div>
</div>
</div>
<div class="block"> <!-- and this -->
<div class="block"> <!-- not this -->
<div class="block"> <!-- not this -->
</div>
</div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…