<div id="main">
<div class="widget">
bla bla
</div>
<div class="widget">
bla bla
</div>
<div class="widget">
bla bla
</div>
</div>
$("#main > div.widget").size(); // will return 3
Title:
jquery - count elements
Description:
<div id="main"> <div class="widget"> bla bla </div> <div class="widget"> bla bla </...
...
Rating:
4