aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/bootstrap.js
diff options
context:
space:
mode:
Diffstat (limited to 'docs/assets/js/bootstrap.js')
-rw-r--r--docs/assets/js/bootstrap.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js
index cf9346eda..cdc1321e3 100644
--- a/docs/assets/js/bootstrap.js
+++ b/docs/assets/js/bootstrap.js
@@ -449,11 +449,18 @@
/* CAROUSEL DATA-API
* ================= */
- $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
+ $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = $.extend({}, $target.data(), $this.data())
+ , slideIndex
+
$target.carousel(options)
+
+ if (slideIndex = $this.attr('data-slide-to')) {
+ $target.data('carousel').pause().to(slideIndex).cycle()
+ }
+
e.preventDefault()
})