HI WELCOME TO KANSIRIS

Count number of img tags inside a div tag

Leave a Comment

 $(“#some_id img”).length

If you want only the direct children, not all descendants:
$(“#some_id > img”).length

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.