Looking to Build/Redesign a Website or Blog ?

To speak to Rakshit, call +91 968 704 2303

Number of Child elements (length) using jQuery

Hello Friends,

Here i am showing you the way to get the number of child elements for parent div. This may be helpful to you when you are show/delete records using jQuery-Ajax and want to update the page accordingly. For e.g. This counting of Children elements helps you to show message like no records when you delete last record. Look at below syntax.

$("div#parent_div").children().length

If you find any problem in this than let me know by comment.
Share:

No Comments Yet.

Leave a Reply

Your email address will not be published.