KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My code goes like this. <div id="some_id"> <img src="some_image.png"> <img src="some_image.png"> <div class="another_div"></div> <div class="another_div"></div> </div> I want to count number of img tags inside that div element. I found this from a similar question on stackoverflow which returns count of all the children. var count = $("#some_id").children().length; How do I modify this code or use some other function to count the number of img tags inside the div?
Tags (comma-separated)
Save Edits
Cancel