I have the following arrangement:
checkbox_1
checkbox_2
button_1
button_2
Right now I wrote a jquery that when checkbox_1 is checked button_1 becomes active:
$('#checkbox_1').change(function() {
if (this.checked) {
$('#btn_1').removeClass('disabled');
} else {
$('#btn_1').addClass('disabled');
}
});
This is a short example. I truly have 7 of these combinations. Is there a way to write the jQuery commands in a way that I write this once instead of 7 times. Each checkbox should activate its individual boxes without affecting each other.