my modal pop up and close immediately in bootstrap4 code example Example 1: close bootstrap modal with javascript $('#myModal').modal('hide'); Example 2: modal dismiss Launch demo modal Modal title × ...