on close modal event code example
Example 1: add event listener on modal close
$('#registration-exams-modal').on('hidden.bs.modal', function () {
alert('close');
})
Example 2: when modal close event
$("yourid").on('hide.bs.modal', function(){
// do it here
});