botatrap 4 on shown event code example
Example 1: bootstrap on hidden bs modal
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})
Example 2: bootstrap modal
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})