<div id="target">
<div id="exclude"></div>
<div></div>
...
</div>
$('#target').children().hide();
will hide all.
<div id="target">
<div id="exclude"></div>
<div></div>
...
</div>
$('#target').children().hide();
will hide all.
You can use :not(#exclude)
to hide all others.
$("#target div:not(#exclude)").hide();
or via $.filter()
:
$("#target").children().filter(":not(#exclude)").hide();
Have you tried using the "not" selector with the id that you want to exclude?
http://docs.jquery.com/Selectors/not#selector
Also, the obvious answer would be to follow it with a $('#exclude').show()
I believe that $('#target > div').not('#exclude').hide()
should do what you want.
Or alternately if you want sub-children that are divs too, $('#target div').not('#exclude').hide()