संभव डुप्लिकेट:
get the elements number inside parent div jqueryसंख्या
यह तत्व है कि एक div के अंदर हैं की संख्या प्राप्त करना संभव है?
<div id=count">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
resut होना चाहिए
4
आप बच्चे तत्वों या div में सभी तत्वों को क्या मतलब है? – karaxuna
* के अंदर * तत्वों की संख्या * * के बच्चों की संख्या से भिन्न हो सकती है। तुम्हें कौनसा चाहिए? – Bergi
टेस्टकेस: http://jsperf.com/children-vs-gt-star – andlrc