]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
remove some jquery references in carousel docs
authorJohann-S <johann.servoire@gmail.com>
Tue, 14 May 2019 09:43:12 +0000 (11:43 +0200)
committerJohann-S <johann.servoire@gmail.com>
Tue, 14 May 2019 12:32:45 +0000 (14:32 +0200)
site/content/docs/4.3/components/carousel.md

index 9dc0c8144518b6dce837f4b0ffe8c749a8917428..44b6d6a459880be9222ae11c48202d184aef89a6 100644 (file)
@@ -308,6 +308,7 @@ var carousel = new bootstrap.Carousel(myCarousel, {
 | `nextWhenVisible` | Only go to the next slide when the page, carousel and the carousel parent is visible. |
 | `to` | Cycles the carousel to a particular frame (0 based, similar to an array). **Returns to the caller before the target item has been shown** (i.e. before the `slid.bs.carousel` event occurs). |
 | `dispose` | Destroys an element's carousel. |
+| `_getInstance` | *Static* method which allows you to get the carousel instance associated with a DOM element |
 
 ### Events
 
@@ -340,7 +341,9 @@ All carousel events are fired at the carousel itself (i.e. at the `<div class="c
 </table>
 
 {{< highlight js >}}
-$('#myCarousel').on('slide.bs.carousel', function () {
+var myCarousel = document.getElementById('myCarousel')
+
+myCarousel.addEventListener('slide.bs.carousel', function () {
   // do something...
 })
 {{< /highlight >}}