how to show and hide bootstrap 5 modal in javascript code example Example: bootstrap 4 hide modal via javascript $('#myModal').modal('hide')