1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-19 11:51:23 +02:00

Doc: fix 'Events' JS example

This commit is contained in:
Julien Déramond
2023-05-04 20:37:46 +02:00
committed by Mark Otto
parent 96b0fd67f5
commit 9129e4a073

View File

@@ -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
})
```