Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

count number of divs inside a div jquery

<div class="wrapper">
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
    <div class="item"></div>
</div>
<script>
alert($('.wrapper').children('.item').length)
</script>
 
PREVIOUS NEXT
Tagged: #count #number #divs #div #jquery
ADD COMMENT
Topic
Name
3+4 =