bootstrap 4 modal how to invoke function when close code example Example: close bootstrap modal with javascript $('#myModal').modal('hide');