diff options
| author | Jacob Thornton <[email protected]> | 2012-06-02 21:01:45 -0700 |
|---|---|---|
| committer | Jacob Thornton <[email protected]> | 2012-06-02 21:01:45 -0700 |
| commit | 3a751a63d45814cab973cd6d9ca9fddf78a1a842 (patch) | |
| tree | d8d6f3f6c8957e542fdc5afdb4982e9d27235610 /js | |
| parent | 555a3b0478b001022d503304d7e5a7118bf8e3a5 (diff) | |
| download | bootstrap-3a751a63d45814cab973cd6d9ca9fddf78a1a842.tar.xz bootstrap-3a751a63d45814cab973cd6d9ca9fddf78a1a842.zip | |
fix multi carousel bug #3194
Diffstat (limited to '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 3938ddd6e..de38b4e0c 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() }) } |
