I'm just starting out with jQuery, and an assignment is asking me to filter a dog breed database by using checkboxes. I've figured out how to remove a certain breed by checking a box, but can't figure out how to add the breed back by clicking the box again. I'm sure this is super simple, but would someone mind helping me out? I'm going back after this graduate class is over on Tuesday to take another class online that moves a lot slower because this is something that, clearly, does not come naturally to me haha. Thanks in advance.
$("#beagle").on('input',function() {
if ( $(".checkbox").is(":checked")) {
$(".beagle").removeClass("hidden");
} else {
$(".beagle").addClass("hidden");
}
});