<div class="main">
<div class="item"></div>
<div class="item active"></div>
<div class="item"></div>
<div class="item"></div>
</div>
Now i want the number of childrens of main class, which will be 4 in this case but i want the count that after the current (active class), which will be 2. how to do that ??
js:
var a = $('.main').find('.item').after('.active').length;