Is there a way in jQuery to count how many divs you have and put that number into a string
<div class="name">SOME TEXT</div>
<div class="name">SOME OTHER TEXT</div>
<div class="different">DIFFERENT TEXT</div>
So count the divs with class name and then put that into a string so the output would be this
var strNoDivs = 2
Any ideas?
Thanks
Jamie
1 Answer