bootstrap detect when modal close code example
Example 1: bootstrap 4 modal close event handler
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})
Example 2: bootstrap modal on close
$('#myModal').on('hidden.bs.modal', function () {
// do something…
});