on closs modal add in jquery code example
Example: add event listener on modal close
$('#registration-exams-modal').on('hidden.bs.modal', function () {
alert('close');
})
$('#registration-exams-modal').on('hidden.bs.modal', function () {
alert('close');
})