I have the following situation:
I need to make clicking a Jquery button check if a checkbox on the page is set to true, and if so, make another checkbox also marked true
I tried to use the following code, but without success:
$("#button").click(function(){
if ($('.box1').is(':checked')) {
$(".box2").prop('checked', true);
}
});
I tried to use the attr function, but it also did not work.