diff options
| author | Pierre Vanduynslager <[email protected]> | 2017-04-08 18:43:25 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-04-08 18:43:25 -0400 |
| commit | fe72daf2b34263d3cfc9bc77e9998cd22adfa34d (patch) | |
| tree | 15dc9fc6fcb513362ba112d52ab01b568b423709 /docs/components/carousel.md | |
| parent | f5cc59145642d78d7abbdf38fee1905786da5367 (diff) | |
| parent | feb35b94a61c4d6016be8d1773a79a6bbe57d856 (diff) | |
| download | bootstrap-fe72daf2b34263d3cfc9bc77e9998cd22adfa34d.tar.xz bootstrap-fe72daf2b34263d3cfc9bc77e9998cd22adfa34d.zip | |
Merge branch 'v4-dev' into dropdown-keyboard
Diffstat (limited to 'docs/components/carousel.md')
| -rw-r--r-- | docs/components/carousel.md | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/components/carousel.md b/docs/components/carousel.md index ea22f3ef9..405aee18c 100644 --- a/docs/components/carousel.md +++ b/docs/components/carousel.md @@ -208,9 +208,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap </tr> <tr> <td>pause</td> - <td>string | null</td> + <td>string | boolean</td> <td>"hover"</td> - <td>If set to <code>"hover"</code>, pauses the cycling of the carousel on <code>mouseenter</code> and resumes the cycling of the carousel on <code>mouseleave</code>. If set to <code>null</code>, hovering over the carousel won't pause it.</td> + <td>If set to <code>"hover"</code>, pauses the cycling of the carousel on <code>mouseenter</code> and resumes the cycling of the carousel on <code>mouseleave</code>. If set to <code>false</code>, hovering over the carousel won't pause it.</td> </tr> <tr> <td>ride</td> @@ -229,6 +229,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap ### Methods +{% capture callout-include %}{% include callout-danger-async-methods.md %}{% endcapture %} +{{ callout-include | markdownify }} + #### `.carousel(options)` Initializes the carousel with an optional options `object` and starts cycling through items. @@ -249,15 +252,15 @@ Stops the carousel from cycling through items. #### `.carousel(number)` -Cycles the carousel to a particular frame (0 based, similar to an array). +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). #### `.carousel('prev')` -Cycles to the previous item. +Cycles to the previous item. **Returns to the caller before the previous item has been shown** (i.e. before the `slid.bs.carousel` event occurs). #### `.carousel('next')` -Cycles to the next item. +Cycles to the next item. **Returns to the caller before the next item has been shown** (i.e. before the `slid.bs.carousel` event occurs). ### Events @@ -265,6 +268,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 `<div class="carousel">`). |
