Find Number of Child Elements (Length) Using jQuery

Posted by bhavin.rana in jQuery



jquery-logo

Hi Friends, Some days ago I was working on one task in which I was trying to find number of child elements by id or class of parent element by jQuery. I searched about it and found solution for it, So I thought it is worth to share on my wesbite for users, So it can be helpful for anyone and save time for someone.

So below I am going to show to show you can find number of child elements using jQuery.

$(“div#parent_div”).children().length

So by above code you can find number of child elements by id of parent element. In above code id of parent element is “parent_div” , So if you will use this code you will get number of child elements inside this parent.

I hope this post helpful for someone. If you have any question then you can ask me anytime or post it in comment.

I hope this post helpful for someone. If you have any question then you can ask me anytime or post it in comment.

Also I am WordPress Developer, Freelance PHP Developer having more than 3 years of experience, So if you want to do any projects then you can contact me.

Hostgator Hosting in 1 Cent Coupon Code – “1CENTHECOUPON” (Without Quotes).

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

  • http://www.egrovesys.com wordpress development

    Great post. Thanks for sharing such a valuable information with us

  • http://profiles.google.com/pr.biztech pr biztech

    A wonderful article you posted. That is so informatory and creative.Please keep these excellent posts coming. You helped me so much.
    Thanks for sharing!

    Php Development India

  • web design dubai

    very useful website!

  • Vijay Kardile

    Thnx

    • Fdgdf

      fghfghf

    • Fdgdf

      fghfghf

  • Sfd

    sdfsdfs

  • Hfghfg

    hiiiiiiiiiiiiiii

    • hgjhdfh

      nhvfghfgh

  • http://www.phpmaestro.com/ php web development

    hi
    thanks for share this valuable information for us

  • Pingback: Krups km1000