mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Doc: fix 'Events' JS example
This commit is contained in:
parent
96b0fd67f5
commit
9129e4a073
@ -118,9 +118,7 @@ All infinitive events provide [`preventDefault()`](https://developer.mozilla.org
|
||||
const myModal = document.querySelector('#myModal')
|
||||
|
||||
myModal.addEventListener('show.bs.modal', event => {
|
||||
if (!data) {
|
||||
return event.preventDefault() // stops modal from being shown
|
||||
}
|
||||
return event.preventDefault() // stops modal from being shown
|
||||
})
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user