我想选择一个带查询的元素,同时省略一个但不是全部子元素:
<div class="parent-that-I-want-jquery-to-find">
<div class="child-I-want-omitted">
<p></p>
</div>
<div class="child-I-dont-want-omitted">
<p></p>
</div>
<div>
答案 0 :(得分:4)
$('.parent-that-I-want-jquery-to-find').children().not('.child-I-want-omitted');