modal on show code example
Example 1: open bootstrap modal with javascript
$("#myModal").modal()
Example 2: bootstrap 4 hide modal via javascript
$('#myModal').modal('hide')
$("#myModal").modal()
$('#myModal').modal('hide')