From: Anton Date: Wed, 17 Mar 2021 05:15:06 +0000 (+0300) Subject: Add example: toggle modal dialogs (#33301) X-Git-Tag: v5.0.0-beta3~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcac2e3aa630f6610d4c17f813199ff855b02344;p=thirdparty%2Fbootstrap.git Add example: toggle modal dialogs (#33301) Co-authored-by: XhmikosR Co-authored-by: Mark Otto --- 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.