bootstrap 5 modal demo code example Example 1: modal in bootstrap 4 $('#myModal').modal('show') Example 2: modal in bootstrap 4 $('#myModal').modal('hide')