diff options
| author | Chris Rebert <[email protected]> | 2014-06-23 11:07:18 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-06-23 11:11:59 -0700 |
| commit | c2c19a4d2d45d8ccb5c84d293dea35a94148c9a4 (patch) | |
| tree | f12ed485a1a3f84ce60c6a195e8efca27f418042 /js/transition.js | |
| parent | bc895a4b43ecfd2ad8c3793fdd6d8bada9d93186 (diff) | |
| download | bootstrap-c2c19a4d2d45d8ccb5c84d293dea35a94148c9a4.tar.xz bootstrap-c2c19a4d2d45d8ccb5c84d293dea35a94148c9a4.zip | |
Revert UMD (#13772 & friends) for now, due to #13812.
Will hopefully revert this reversion and land a fully-working version of UMD in v3.3.0.
Revert "some changes from #13801 - add strict mode back and =="
This reverts commit 2b302f69eea416bc85e7827b7d7a74d49f879662.
Revert "Fix regression of #10038 introduced by #13772"
This reverts commit e9d6756a1ac76a9db31a41e8e03f663bedc41b70.
Revert "MD/CommonJS/Globals #12909"
This reverts commit 1c6fa9010daf0d0c21de9e20fe6ac4dba1788d90.
Revert "address #13811"
This reverts commit f347d7d955bbb17234b8e12c68efae7d516ce62c.
Conflicts:
js/carousel.js
js/collapse.js
js/dropdown.js
js/modal.js
js/tab.js
js/tooltip.js
Diffstat (limited to 'js/transition.js')
| -rw-r--r-- | js/transition.js | 86 |
1 files changed, 40 insertions, 46 deletions
diff --git a/js/transition.js b/js/transition.js index a747dc2fd..7e3a4117e 100644 --- a/js/transition.js +++ b/js/transition.js @@ -7,59 +7,53 @@ * ======================================================================== */ -+function () { 'use strict'; ++function ($) { + 'use strict'; - (function (o_o) { - typeof define == 'function' && define.amd ? define(['jquery'], o_o) : - typeof exports == 'object' ? o_o(require('jquery')) : o_o(jQuery) - })(function ($) { + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ + function transitionEnd() { + var el = document.createElement('bootstrap') - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - - return false // explicit for ie8 ( ._.) + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' } - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } } - $(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) - } + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(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) } - }) - + } }) -}(); +}(jQuery); |
