diff options
| author | Johann-S <[email protected]> | 2019-07-31 22:05:24 +0200 |
|---|---|---|
| committer | Johann-S <[email protected]> | 2019-08-01 10:37:27 +0200 |
| commit | b7a079d808d6b14d90b37fa16418de287209cd53 (patch) | |
| tree | 1c75c458c709027f8e5e750f06e3eba75b2a91db | |
| parent | 291bbac5194c47c34c54de5c54d9a792004922e7 (diff) | |
| download | bootstrap-b7a079d808d6b14d90b37fa16418de287209cd53.tar.xz bootstrap-b7a079d808d6b14d90b37fa16418de287209cd53.zip | |
add callout about jquery events
| -rw-r--r-- | site/content/docs/4.3/getting-started/javascript.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/site/content/docs/4.3/getting-started/javascript.md b/site/content/docs/4.3/getting-started/javascript.md index d4c006094..580e1f255 100644 --- a/site/content/docs/4.3/getting-started/javascript.md +++ b/site/content/docs/4.3/getting-started/javascript.md @@ -64,6 +64,19 @@ myModal.addEventListener('show.bs.modal', function (e) { }) {{< /highlight >}} +{{< callout warning >}} +## jQuery events + +Bootstrap detect jQuery only if `jQuery` is present in `window` object. If jQuery is found, Bootstrap will emit events thanks to jQuery event system. +So if you want to listen Bootstrap's events you'll have to use jQuery methods (`.on`, `.one`). + +{{< highlight js >}} +$('#myTab a').on('shown.bs.tab', function () { + // do something... +}) +{{< /highlight >}} +{{< /callout >}} + ## Programmatic API All constructors accept an optional options object or nothing (which initiates a plugin with its default behavior): |
