From c72a315740c852152c1bc6a34bf2b4c2372fe389 Mon Sep 17 00:00:00 2001 From: Johann Date: Wed, 22 Mar 2017 22:42:13 +0100 Subject: [PATCH] Carousel - Add attributes from and to for Slid and Slide events (#21668) Carousel - Add attributes from and to for Slid and Slide events --- docs/components/carousel.md | 2 ++ js/src/carousel.js | 13 ++++++++--- js/tests/unit/carousel.js | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/docs/components/carousel.md b/docs/components/carousel.md index ea22f3ef99..24a42a617a 100644 --- a/docs/components/carousel.md +++ b/docs/components/carousel.md @@ -265,6 +265,8 @@ Bootstrap's carousel class exposes two events for hooking into carousel function - `direction`: The direction in which the carousel is sliding (either `"left"` or `"right"`). - `relatedTarget`: The DOM element that is being slid into place as the active item. +- `from`: The index of the current item +- `to`: The index of the next item All carousel events are fired at the carousel itself (i.e. at the `