jquery even on hide modal code example
Example 1: check if modal hide jquery
alert($('#registration-exams-modal').hasClass('show'));
Example 2: hide and show modal jquery
$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');