Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Otto <otto@github.com>2012-12-26 19:21:34 +0400
committerMark Otto <otto@github.com>2012-12-26 19:21:34 +0400
commit9749d6afc2730d41cab0111e1cc19bba7c5c3676 (patch)
tree5420af50b680ac608d6ed177d24d79870dcad544 /docs/assets/js/bootstrap-carousel.js
parentf74990d898b08be61f0f8b514378adf223d55a4b (diff)
parentb9c7f29134f2fa81931fa4663fc40ef7a0e363d1 (diff)
Merge branch '2.3.0-wip' of github.com:twitter/bootstrap into 2.3.0-wip
Diffstat (limited to 'docs/assets/js/bootstrap-carousel.js')
-rw-r--r--docs/assets/js/bootstrap-carousel.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js
index cb006cfdbc..5d14e7c711 100644
--- a/docs/assets/js/bootstrap-carousel.js
+++ b/docs/assets/js/bootstrap-carousel.js
@@ -188,11 +188,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()
})