aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.0/getting-started/javascript.md
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2020-11-21 17:00:38 +0200
committerGitHub <[email protected]>2020-11-21 17:00:38 +0200
commitd365831bce972ce089ebd89e91ba7c2cf6e13c5e (patch)
tree065dc80dc2cdd410368fc17fd464cf9ffa945d15 /site/content/docs/5.0/getting-started/javascript.md
parentf4457bca0274cbe02422434294e3c6a006da7750 (diff)
downloadbootstrap-d365831bce972ce089ebd89e91ba7c2cf6e13c5e.tar.xz
bootstrap-d365831bce972ce089ebd89e91ba7c2cf6e13c5e.zip
docs: use `event` instead of `e` (#32226)
It's better for clarity.
Diffstat (limited to 'site/content/docs/5.0/getting-started/javascript.md')
-rw-r--r--site/content/docs/5.0/getting-started/javascript.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/site/content/docs/5.0/getting-started/javascript.md b/site/content/docs/5.0/getting-started/javascript.md
index 742ecb161..53845fdfc 100644
--- a/site/content/docs/5.0/getting-started/javascript.md
+++ b/site/content/docs/5.0/getting-started/javascript.md
@@ -61,9 +61,9 @@ All infinitive events provide [`preventDefault()`](https://developer.mozilla.org
```js
var myModal = document.getElementById('myModal')
-myModal.addEventListener('show.bs.modal', function (e) {
+myModal.addEventListener('show.bs.modal', function (event) {
if (!data) {
- return e.preventDefault() // stops modal from being shown
+ return event.preventDefault() // stops modal from being shown
}
})
```
@@ -102,7 +102,7 @@ In order to execute an action once the transition is complete, you can listen to
```js
var myCollapseEl = document.getElementById('#myCollapse')
-myCollapseEl.addEventListener('shown.bs.collapse', function (e) {
+myCollapseEl.addEventListener('shown.bs.collapse', function (event) {
// Action to execute once the collapsible area is expanded
})
```
@@ -113,7 +113,7 @@ In addition a method call on a **transitioning component will be ignored**.
var myCarouselEl = document.getElementById('myCarousel')
var carousel = bootstrap.Carousel.getInstance(myCarouselEl) // Retrieve a Carousel instance
-myCarouselEl.addEventListener('slid.bs.carousel', function (e) {
+myCarouselEl.addEventListener('slid.bs.carousel', function (event) {
carousel.to('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished
})