How to close modal in Bootstrap
There are few ways to close modal in Bootstrap: click on a backdrop, close icon, or close
button. You can also use JavaScript hide
method.
Click the button to launch the modal. Then click on the backdrop, close icon or close button to close the modal.
You can also close the modal programmatically by using
hide
method.
hide
manually hides a modal.
Returns to the caller before the modal has actually been hidden
(i.e. before the hidden.bs.modal
event occurs).
See also Modal API to learn more.