From 2c9f43f6858597b3bbc6d4036a3bd1dd18d6181f Mon Sep 17 00:00:00 2001 From: fat Date: Thu, 20 Dec 2012 01:05:07 -0800 Subject: [PATCH 1/2] if carousel element already open, don't reopen it duh bruh bruh --- js/bootstrap-collapse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 9e72112188..6755aa7e20 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -52,7 +52,7 @@ , actives , hasData - if (this.transitioning) return + if (this.transitioning || this.$element.hasClass('in')) return dimension = this.dimension() scroll = $.camelCase(['scroll', dimension].join('-')) From 5abe33f5d84e8b7357f50744a7ce7d4420745dd8 Mon Sep 17 00:00:00 2001 From: fat Date: Thu, 20 Dec 2012 01:13:03 -0800 Subject: [PATCH 2/2] reset carousel in the case that it is reinstantiated twice --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 6a1b21f370..4838a16847 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -164,7 +164,7 @@ if (!data) $this.data('carousel', (data = new Carousel(this, options))) if (typeof option == 'number') data.to(option) else if (action) data[action]() - else if (options.interval) data.cycle() + else if (options.interval) data.pause().cycle() }) }