Counting immediate child elements with jQuery

[javascript]
<div id="foo">
<div id="bar"></div>
<div id="baz">
<div id="biz">
</div>
<span><span>
</div>

//jQuery code to count child elements
$("#foo > div").size()
[/javascript]

Leave a Reply