Hide the modal:
$('#myModal').modal('hide');
Toggle the modal. This will hide the modal if it is already shown.
$('#myModal').modal('toggle');
Using vanilla JavaScript:
<script>
var myModal = document.getElementById('modalID');
myModal.hide();
</script>
Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.