When I check the checkbox for 'Monday', the 'Tuesday' checked status is updated. It works well simultaneously.
But, once I click to check or uncheck 'Tuesday', and if I then check 'Monday', the 'Tuesday' doesn't change status as same as 'Monday' anymore. After checking/unchecking 'Tuesday' it doesn't sync with the 'Monday' checkbox.
$(function() {
// main product upload
$("#monday").change(function(e) {
$("#tuesday").attr("checked", this.checked);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<input type="checkbox" id="monday" name="monday">
<input type="checkbox" id="tuesday" name="tuesday">