Sunday, July 17, 2011

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.

0 comments:

Post a Comment

Any Questions or Suggestions ?

About

Professional & Experienced Freelance Developer From India, Technologist, Software Engineer, internet marketer and Open Sources Developer with experience in Finance, Telecoms and the Media. Contact Me for freelancing projects.

Enter your email address:

Delivered by FeedBurner