From e6a39f634b5d65664a981f838292273cc9ba57ae Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 8 Mar 2021 02:24:49 +0300 Subject: [PATCH 1/4] Update modal.md --- site/content/docs/5.0/components/modal.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 0abe0ce0f2fa..ad380daf6d66 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -892,6 +892,13 @@ Manually opens a modal. **Returns to the caller before the modal has actually be myModal.show() ``` +Also, you can pass related target: + +```js +var relatedTarget = document.getElementById('toggleMyModal') +myModal.show(relatedTarget) +``` + #### 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). From beaca866615498ee3dae2595c9d75b92f2646c44 Mon Sep 17 00:00:00 2001 From: Anton Date: Mon, 8 Mar 2021 21:32:44 +0300 Subject: [PATCH 2/4] Update modal.md --- site/content/docs/5.0/components/modal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index ad380daf6d66..48cf1832cd13 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -892,7 +892,7 @@ Manually opens a modal. **Returns to the caller before the modal has actually be myModal.show() ``` -Also, you can pass related target: +Also, please mention that the DOM element passed as the first argument can be received in the modal events (as the `relatedTarget` property): ```js var relatedTarget = document.getElementById('toggleMyModal') From cc523ee545883cba7609f87ca1d99bfc36c7cc34 Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Tue, 9 Mar 2021 00:25:41 +0530 Subject: [PATCH 3/4] Update modal.md --- site/content/docs/5.0/components/modal.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 48cf1832cd13..b3bbdc5d5aa7 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -892,11 +892,11 @@ Manually opens a modal. **Returns to the caller before the modal has actually be myModal.show() ``` -Also, please mention that the DOM element passed as the first argument can be received in the modal events (as the `relatedTarget` property): +Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property): ```js -var relatedTarget = document.getElementById('toggleMyModal') -myModal.show(relatedTarget) +var modalToggle = document.getElementById('toggleMyModal') // relatedTarget +myModal.show(modalToggle) ``` #### hide From ce77db5f515a51dfef248813a760eb4cf0198bbf Mon Sep 17 00:00:00 2001 From: Rohit Sharma Date: Sun, 14 Mar 2021 12:27:09 +0530 Subject: [PATCH 4/4] Update modal.md --- site/content/docs/5.0/components/modal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index b3bbdc5d5aa7..0f11614fdeaf 100644 --- a/site/content/docs/5.0/components/modal.md +++ b/site/content/docs/5.0/components/modal.md @@ -892,7 +892,7 @@ Manually opens a modal. **Returns to the caller before the modal has actually be myModal.show() ``` -Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property): +Also, you can pass a DOM element as an argument that can be received in the modal events (as the `relatedTarget` property). ```js var modalToggle = document.getElementById('toggleMyModal') // relatedTarget