Reputation: 25239
assuming i have
<div class="myclass">
<div>parent<div>
<div>parent<div>
<div>
parent
<div>child<div>
<div>
<div>parent<div>
</div>
if i wanted to select all the "li" parent excluding the li child...how can i do that?
$(".myclass div")
?
Upvotes: 0
Views: 862
Reputation: 4644
Using:
$(".myclass > div")
will select just the direct children instead of all descendants.
Upvotes: 4