javascript modal("hide") code example
Example 1: jquery modal on show + target button
$('#delete-file-modal').on('show.bs.modal', function (event) {
console.log(event.relatedTarget);
});
Example 2: bootstrap 4 hide modal via javascript
$('#myModal').modal('hide')