diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2012-06-03 08:01:45 +0400 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2012-06-03 08:01:45 +0400 |
commit | 3a751a63d45814cab973cd6d9ca9fddf78a1a842 (patch) | |
tree | d8d6f3f6c8957e542fdc5afdb4982e9d27235610 /js/bootstrap-carousel.js | |
parent | 555a3b0478b001022d503304d7e5a7118bf8e3a5 (diff) |
fix multi carousel bug #3194
Diffstat (limited to 'js/bootstrap-carousel.js')
-rw-r--r-- | js/bootstrap-carousel.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 3938ddd6ec..de38b4e0cf 100644 --- a/js/bootstrap-carousel.js +++ b/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() }) } |