bottstrap button onclick modal hide code example Example: bootstrap 4 hide modal via javascript $('#myModal').modal('hide')