javascript bootsrap modal close code example
Example 1: close bootstrap modal with javascript
$('#myModal').modal('hide');
Example 2: Listen for the closing of a bootstrap modal
$('#myModal').on('hidden.bs.modal', function () {
// do something…
});