Skip to content

Commit

Permalink
Doc: fix 'Events' JS example
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-deramond authored and mdo committed Jun 1, 2023
1 parent 96b0fd6 commit 9129e4a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions site/content/docs/5.3/getting-started/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
```

Expand Down

0 comments on commit 9129e4a

Please sign in to comment.