I'm guessing you are using jQuery AJAX, based on the jQuery tag on the question. In that case, you need to change your "checked" attribute in one of the callback functions to ensure that it fires after the AJAX is complete. You should use the
success
or
complete
callback function, depending on what you want.
$.ajax({
url: whatever,
data: { whatever: whatever },
type: 'GET',
success: function (data, status, jqXHR) {
$(".selsts").attr('checked', false);
}
});
The
success
callback function will fire only if there are no errors. The
complete
callback function will always fire, after the
success
callback, if there was one.