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:
authorJacob Thornton <jacobthornton@gmail.com>2012-06-03 08:01:45 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-06-03 08:01:45 +0400
commit3a751a63d45814cab973cd6d9ca9fddf78a1a842 (patch)
treed8d6f3f6c8957e542fdc5afdb4982e9d27235610 /docs/assets/js/bootstrap-carousel.js
parent555a3b0478b001022d503304d7e5a7118bf8e3a5 (diff)
fix multi carousel bug #3194
Diffstat (limited to 'docs/assets/js/bootstrap-carousel.js')
-rw-r--r--docs/assets/js/bootstrap-carousel.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/assets/js/bootstrap-carousel.js b/docs/assets/js/bootstrap-carousel.js
index 3938ddd6ec..de38b4e0cf 100644
--- a/docs/assets/js/bootstrap-carousel.js
+++ b/docs/assets/js/bootstrap-carousel.js
@@ -144,9 +144,10 @@
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+ , action = typeof option == 'string' ? option : options.slide
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
- else if (typeof option == 'string' || (option = options.slide)) data[option]()
+ else if (action) data[action]()
else if (options.interval) data.cycle()
})
}