From 08b8571cb842e9fc668d9faf6c305a51523b27fb Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 5 Sep 2012 10:00:57 -0700 Subject: version bump to get this started --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 5c194b428..0d7167e1c 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.1.1 + * bootstrap-carousel.js v2.1.2 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. -- cgit v1.2.3 From 474471b83140350de320f3ba940bd7dd8326b32e Mon Sep 17 00:00:00 2001 From: Carl Porth Date: Wed, 26 Sep 2012 23:11:03 -0700 Subject: bind data-api events to document instead of body to allow body replacement --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 0d7167e1c..8751b320c 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -164,7 +164,7 @@ * ================= */ $(function () { - $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { + $(document).on('click.carousel.data-api', '[data-slide]', function ( e ) { var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) -- cgit v1.2.3 From e1f6458e3640a628cdb6b2e4c63950777d46e141 Mon Sep 17 00:00:00 2001 From: Carl Porth Date: Thu, 27 Sep 2012 15:00:02 -0700 Subject: don't wait for ready when binding events to document --- js/bootstrap-carousel.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 8751b320c..6b01f763b 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -163,14 +163,12 @@ /* CAROUSEL DATA-API * ================= */ - $(function () { - $(document).on('click.carousel.data-api', '[data-slide]', function ( e ) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) - $target.carousel(options) - e.preventDefault() - }) + $(document).on('click.carousel.data-api', '[data-slide]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) + $target.carousel(options) + e.preventDefault() }) }(window.jQuery); \ No newline at end of file -- cgit v1.2.3 From 432eaff29cc05f488fc0a1c87d1e28d86ef3641e Mon Sep 17 00:00:00 2001 From: dmitriybudnik Date: Mon, 15 Oct 2012 21:55:32 +0300 Subject: Fixed copy/paste caused typo --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 0d7167e1c..0852cf3f4 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -167,7 +167,7 @@ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) { var $this = $(this), href , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data()) + , options = !$target.data('carousel') && $.extend({}, $target.data(), $this.data()) $target.carousel(options) e.preventDefault() }) -- cgit v1.2.3 From edc3eee5eaae52384de1486639585c0b41318cf8 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Wed, 17 Oct 2012 22:26:44 -0700 Subject: fix carousel event --- js/bootstrap-carousel.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 0852cf3f4..b53315652 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -94,9 +94,7 @@ , direction = type == 'next' ? 'left' : 'right' , fallback = type == 'next' ? 'first' : 'last' , that = this - , e = $.Event('slide', { - relatedTarget: $next[0] - }) + , e this.sliding = true @@ -104,6 +102,10 @@ $next = $next.length ? $next : this.$element.find('.item')[fallback]() + e = $.Event('slide', { + relatedTarget: $next[0] + }) + if ($next.hasClass('active')) return if ($.support.transition && this.$element.hasClass('slide')) { -- cgit v1.2.3 From 41ad16fe406956cc8604b295ae0b5f185386c595 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Mon, 29 Oct 2012 21:00:53 -0700 Subject: v2.2.0 instead of v2.1.2 --- js/bootstrap-carousel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/bootstrap-carousel.js') diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 0101f8881..601f7b50e 100644 --- a/js/bootstrap-carousel.js +++ b/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.1.2 + * bootstrap-carousel.js v2.2.0 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. -- cgit v1.2.3