show.bs.modal event code example
Example 1: bootstrap on hidden bs modal
$('#myModal').on('hidden.bs.modal', function (e) {
// do something...
})
Example 2: bootstrap 4 hide modal via javascript
$('#myModal').modal('hide')
Example 3: how to show bootstrap modal
<script>
var myModal = new bootstrap.Modal(document.getElementById('ModalID'))
myModal.show()
</script>