This article will tell us how the bootstrap executes when the .modal (modal window) gets closed. At some point of time, the modal window – whenever it gets opened (along with the class modal), it is going to get closed.
As soon the modal has got finished, after being getting hidden from the user, the event will be fired up. The function will get executed and also the below syntax will be triggered, whenever the modal window gets hidden away. By the way, it will call to the caller/user, before disappearing straight away. Also, this is not managed by the user at all. The Bootstrap library is built-in already, and it is going to do the maximum work for you.
The below syntax will be used when the Bootstrap modal is about to be hidden or to hide the Bootstrap modal.
Example: This example shows the usage of hide.bs.modal.
When we load the code:
When we click on ‘X’ button:
- Bootstrap 4 | Modal
- What does .modal('dispose') do in Bootstrap 4 ?
- How to get the same behavior with confirm and bootstrap modal?
- How to configure modal width in Bootstrap?
- How to use modal closing event in Twitter Bootstrap ?
- How to use Bootstrap modal for YouTube videos and play automatically ?
- Image Replacement in Bootstrap using text-hide Class
- How to hide text-overflown as ellipsis using dynamic bootstrap cols ?
- HTML | Responsive Modal Login Form
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.