Reputation: 1402
Say I have the below HTML
<div id="target">
<div>
<div></div> //hide this one
</div>
...
</div>
How can I hide the second div .$('#target').children().hide(); will hide starting the first .
Thanks
Upvotes: 0
Views: 31
Reputation: 731
And if you need to do this with css
#target > div div:first-child {display:none;}
Upvotes: 0
Reputation: 18467
I guess you want:
$('#target div div').hide();
Select the div inside the div inside #target
.
Upvotes: 2