diff options
author | Jacob Thornton <jacobthornton@gmail.com> | 2012-10-18 09:26:44 +0400 |
---|---|---|
committer | Jacob Thornton <jacobthornton@gmail.com> | 2012-10-18 09:26:44 +0400 |
commit | edc3eee5eaae52384de1486639585c0b41318cf8 (patch) | |
tree | 7c82af98402716dbbdd70d6ff2ff7a16648726b1 /js/bootstrap-carousel.js | |
parent | 8e6697f2b20da705377d2a7a2eb6957a4df59d77 (diff) |
fix carousel event
Diffstat (limited to 'js/bootstrap-carousel.js')
-rw-r--r-- | js/bootstrap-carousel.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/bootstrap-carousel.js b/js/bootstrap-carousel.js index 0852cf3f43..b533156526 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')) { |