custom js for modal eg bootstrap 4 code example Example: bootstrap 4 hide modal via javascript $('#myModal').modal('hide')