From 3a751a63d45814cab973cd6d9ca9fddf78a1a842 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sat, 2 Jun 2012 21:01:45 -0700 Subject: fix multi carousel bug #3194 --- docs/assets/js/bootstrap.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/assets/js/bootstrap.js') diff --git a/docs/assets/js/bootstrap.js b/docs/assets/js/bootstrap.js index 9a795f712..176cafa04 100644 --- a/docs/assets/js/bootstrap.js +++ b/docs/assets/js/bootstrap.js @@ -388,9 +388,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() }) } -- cgit v1.2.3