From fcac2e3aa630f6610d4c17f813199ff855b02344 Mon Sep 17 00:00:00 2001 From: Anton Date: Wed, 17 Mar 2021 08:15:06 +0300 Subject: [PATCH] Add example: toggle modal dialogs (#33301) Co-authored-by: XhmikosR Co-authored-by: Mark Otto --- site/content/docs/5.0/components/modal.md | 69 +++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 0f11614fde..3e8ad80102 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -509,6 +509,75 @@ exampleModal.addEventListener('show.bs.modal', function (event) { }) ``` +### Toggle between modals + +Toggle between multiple modals with some clever placement of the `data-bs-target` and `data-bs-toggle` attributes. For example, you could toggle a password reset modal from within an already open sign in modal. **Please note multiple modals cannot be open at the same time**—this method simply toggles between two separate modals. + +
+ + + Open first modal +
+ +```html + + + + + +Open #modal +``` + ### Change animation The `$modal-fade-transform` variable determines the transform state of `.modal-dialog` before the modal fade-in animation, the `$modal-show-transform` variable determines the transform of `.modal-dialog` at the end of the modal fade-in animation. -- 2.47.2