diff options
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() }) } |
