diff --git a/docs/javascript.html b/docs/javascript.html
index b4473738c3..ac617a6b85 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -1456,6 +1456,11 @@ $('#myCollapsible').on('hidden', function () {
<div id="myCarousel" class="carousel slide">
+ <ol class="carousel-indicators">
+ <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
+ <li data-target="#myCarousel" data-slide-to="1"></li>
+ <li data-target="#myCarousel" data-slide-to="2"></li>
+ </ol>
<!-- Carousel items -->
<div class="carousel-inner">
<div class="active item">…</div>
@@ -1480,14 +1485,14 @@ $('#myCollapsible').on('hidden', function () {
Usage
Via data attributes
- ...
+ Use data attributes to easily control the position of the carousel. data-slide
accepts the keywords prev
or next
, which alters the slide position relative to it's current position. Alternatively, use data-slide-to
to pass a raw slide index to the carousel data-slide-to="2"
, which jump's the slide position to a particular index beginning with 0
.
Via JavaScript
Call carousel manually with:
$('.carousel').carousel()
Options
- Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-interval=""
.
+ Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to data-
, as in data-interval=""
.
diff --git a/docs/templates/pages/javascript.mustache b/docs/templates/pages/javascript.mustache
index 23c14b8349..129c4858c0 100644
--- a/docs/templates/pages/javascript.mustache
+++ b/docs/templates/pages/javascript.mustache
@@ -1386,6 +1386,11 @@ $('#myCollapsible').on('hidden', function () {
{{! /example }}
<div id="myCarousel" class="carousel slide">
+ <ol class="carousel-indicators">
+ <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
+ <li data-target="#myCarousel" data-slide-to="1"></li>
+ <li data-target="#myCarousel" data-slide-to="2"></li>
+ </ol>
<!-- {{_i}}Carousel items{{/i}} -->
<div class="carousel-inner">
<div class="active item">…</div>
@@ -1410,14 +1415,14 @@ $('#myCollapsible').on('hidden', function () {
{{_i}}Usage{{/i}}
{{_i}}Via data attributes{{/i}}
- {{_i}}...{{/i}}
+ {{_i}}Use data attributes to easily control the position of the carousel. data-slide
accepts the keywords prev
or next
, which alters the slide position relative to it's current position. Alternatively, use data-slide-to
to pass a raw slide index to the carousel data-slide-to="2"
, which jump's the slide position to a particular index beginning with 0
.{{/i}}
{{_i}}Via JavaScript{{/i}}
{{_i}}Call carousel manually with:{{/i}}
$('.carousel').carousel()
{{_i}}Options{{/i}}
- {{_i}}Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-
, as in data-interval=""
.{{/i}}
+ {{_i}}Options can be passed via data attributes or JavaScriptz. For data attributes, append the option name to data-
, as in data-interval=""
.{{/i}}