Can't change checkbox state from jquery ajax response
I am trying to change the state of the checkbox in case the request fails. But it won't change it from inside the fail function of jquery's ajax: $('.checkbox').on('change', function () { let checked = $(this).is(':checked'); var jqxhr = $.ajax({…