From f1009c19b31c24df871b97efa74e8e10791bb2c3 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Tue, 23 Jul 2013 18:44:08 -0700 Subject: revert collapse change + add emulateTransitionEvent to catch dead css transitions --- js/carousel.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'js/carousel.js') diff --git a/js/carousel.js b/js/carousel.js index 78e878546..4def0cec2 100644 --- a/js/carousel.js +++ b/js/carousel.js @@ -130,12 +130,14 @@ $next[0].offsetWidth // force reflow $active.addClass(direction) $next.addClass(direction) - this.$element.find('.item').one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) + this.$element.find('.item') + .one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + .emulateTransitionEnd(600) } else { this.$element.trigger(e) if (e.isDefaultPrevented()) return -- cgit v1.2.3