Possible Duplicate:
get the elements number inside parent div jquery
Is it possible to get the number of elements that are inside a div?
<div id=count">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
the resut should be
4
$('#count').children().length; // 4
var count = $('#count > *').length;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With