diff --git a/site/content/docs/5.0/components/modal.md b/site/content/docs/5.0/components/modal.md index 0abe0ce0f2fa..0f11614fdeaf 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 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 +myModal.show(modalToggle) +``` + #### 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).