![]() |
VOOZH | about |
Modal Closing Event in Twitter Bootstrap | Set 1
Prerequisite Knowledge: Bootstrap 4 | Modal
Twitter Bootstrapโs modal class offer a few events that are fired at the standard Bootstrap modal class. Bootstrap Modals offer a lightweight, multi-purpose JavaScript popup that is customizable and responsive. They can be used to display alert popups, videos, and images in a website. Bootstrap Modals are divided into three primary sections: header, body, and footer.
The Bootstrap Events are: show.bs.modal, shown.bs.modal, hide.bs.modal, hidden.bs.modal etc. Out of all these events, we are interested in the hide.bs.modal and hidden.bs.modal events.
Example:
Output:
Before Clicking the Button:
๐ ImageAfter Clicking the Button:
๐ ImageOn closing modal, observe the console:
๐ ImageSo when modal is closed, we successfully handle it using