diff options
| author | Julien Déramond <[email protected]> | 2023-05-04 20:37:46 +0200 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2023-05-31 19:32:01 -0700 |
| commit | 9129e4a0736772817b433950613532d29da7e92f (patch) | |
| tree | d8dbabe03330110ac0097ef59f35b9feee4f2699 /site/content/docs/5.3/getting-started/javascript.md | |
| parent | 96b0fd67f5c400431255a5f3b207042b93452235 (diff) | |
| download | bootstrap-9129e4a0736772817b433950613532d29da7e92f.tar.xz bootstrap-9129e4a0736772817b433950613532d29da7e92f.zip | |
Doc: fix 'Events' JS example
Diffstat (limited to 'site/content/docs/5.3/getting-started/javascript.md')
| -rw-r--r-- | site/content/docs/5.3/getting-started/javascript.md | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/site/content/docs/5.3/getting-started/javascript.md b/site/content/docs/5.3/getting-started/javascript.md index 8efb2fb00..80c222fcd 100644 --- a/site/content/docs/5.3/getting-started/javascript.md +++ b/site/content/docs/5.3/getting-started/javascript.md @@ -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 }) ``` |
