diff options
| author | fat <[email protected]> | 2014-06-10 19:56:08 -0700 |
|---|---|---|
| committer | fat <[email protected]> | 2014-06-10 20:42:19 -0700 |
| commit | 7f122be0041ff2d4314a196d53d32dc5f295ed02 (patch) | |
| tree | 2723e3f32ad56df27b49285a577d4c9639c17b5a /js/transition.js | |
| parent | 9cdbf0e80702b9a6a772a2d4a81d8d94dbe1c0eb (diff) | |
| download | bootstrap-7f122be0041ff2d4314a196d53d32dc5f295ed02.tar.xz bootstrap-7f122be0041ff2d4314a196d53d32dc5f295ed02.zip | |
add special transitionend type to test event origin
fixes #13430
Diffstat (limited to 'js/transition.js')
| -rw-r--r-- | js/transition.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/js/transition.js b/js/transition.js index 8fcf8ff4b..efc66bae9 100644 --- a/js/transition.js +++ b/js/transition.js @@ -40,7 +40,7 @@ $.fn.emulateTransitionEnd = function (duration) { var called = false var $el = this - $(this).one($.support.transition.end, function () { called = true }) + $(this).one('bsTransitionEnd', function () { called = true }) var callback = function () { if (!called) $($el).trigger($.support.transition.end) } setTimeout(callback, duration) return this @@ -48,6 +48,16 @@ $(function () { $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } }) }); |
