My code is :
<div class='container'>
<label>Label 1</label>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<label>Label 2 </label>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
If user clicks on div inside container, I am adding class "clicked" like this
$(".container>div").click(function(){
$(this).addClass("clicked");
});
I want to know how many divs are clicked next to each label and when all divs have been clicked, I want to add a CSS class to that label
For example when the visitor have clicked all 5 divs next to Label 1 change its class,
ditto for the 4 divs next to Label 2