aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/4.5/getting-started/javascript.md
diff options
context:
space:
mode:
Diffstat (limited to 'site/content/docs/4.5/getting-started/javascript.md')
-rw-r--r--site/content/docs/4.5/getting-started/javascript.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/site/content/docs/4.5/getting-started/javascript.md b/site/content/docs/4.5/getting-started/javascript.md
index 015ea5fdb..faa01c48d 100644
--- a/site/content/docs/4.5/getting-started/javascript.md
+++ b/site/content/docs/4.5/getting-started/javascript.md
@@ -48,9 +48,9 @@ Bootstrap provides custom events for most plugins' unique actions. Generally, th
All infinitive events provide [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call `preventDefault()`.
```js
-$('#myModal').on('show.bs.modal', function (e) {
+$('#myModal').on('show.bs.modal', function (event) {
if (!data) {
- return e.preventDefault() // stops modal from being shown
+ return event.preventDefault() // stops modal from being shown
}
})
```
@@ -80,7 +80,7 @@ All programmatic API methods are **asynchronous** and return to the caller once
In order to execute an action once the transition is complete, you can listen to the corresponding event.
```js
-$('#myCollapse').on('shown.bs.collapse', function (e) {
+$('#myCollapse').on('shown.bs.collapse', function (event) {
// Action to execute once the collapsible area is expanded
})
```
@@ -88,7 +88,7 @@ $('#myCollapse').on('shown.bs.collapse', function (e) {
In addition a method call on a **transitioning component will be ignored**.
```js
-$('#myCarousel').on('slid.bs.carousel', function (e) {
+$('#myCarousel').on('slid.bs.carousel', function (event) {
$('#myCarousel').carousel('2') // Will slide to the slide 2 as soon as the transition to slide 1 is finished
})