HTML:
<form class="thirdlevel" id="monkeybox">
<input type="checkbox" name="monkey" value="monkey" class="correct"> Monkey <br>
<input type="checkbox" name="monkey" value="yellow" class="incorrect"> Yellow <br>
<input type="checkbox" name="monkey" value="brown" class="correct"> Brown <br>
<input type="checkbox" name="monkey" value="human" class="incorrect"> Human <br>
<input type="checkbox" name="monkey" value="mouse" class="incorrect"> Mouse<br>
<input type="checkbox" name="monkey" value="horse" class="incorrect"> Horse <br>
<input type="checkbox" name="monkey" value="hairy" class="correct"> Hairy <br>
<input type="checkbox" name="monkey" value="land" class="correct"> Land creature<br>
</form>
JS:
$monkeybox.on("change", function() {
$(":checkbox").on("change", function() {
if (all checkboxes with class "correct" are checked && all checkboxes with class "incorrect" aren't checked) {
//do something
}
});
});
This is what I have so far. I'm not sure how to check if all checkboxes with class "correct" are checked and if all checkboxes that have class "incorrect" aren't checked. I'm completely lost on how to do this.