mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
Update modal's show
method to accept relatedTarget
as an argument (#33300)
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
parent
99b2c0b390
commit
af42557f4a
@ -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).
|
||||
|
Loading…
Reference in New Issue
Block a user