From 593b062c7a9781272b983a1a2e1af0824d79e1c4 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Tue, 17 Jan 2012 10:32:25 -0800 Subject: [PATCH] wrap transition --- js/bootstrap-transition.js | 50 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/js/bootstrap-transition.js b/js/bootstrap-transition.js index aaaee4bd28..8f6e86e442 100644 --- a/js/bootstrap-transition.js +++ b/js/bootstrap-transition.js @@ -17,31 +17,35 @@ * limitations under the License. * ========================================================== */ -$(function () { +!function( $ ) { - "use strict" + $(function () { - /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) - * ======================================================= */ + "use strict" - $.support.transition = (function () { - var thisBody = document.body || document.documentElement - , thisStyle = thisBody.style - , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined + /* CSS TRANSITION SUPPORT (https://gist.github.com/373874) + * ======================================================= */ - return support && { - end: (function () { - var transitionEnd = "TransitionEnd" - if ( $.browser.webkit ) { - transitionEnd = "webkitTransitionEnd" - } else if ( $.browser.mozilla ) { - transitionEnd = "transitionend" - } else if ( $.browser.opera ) { - transitionEnd = "oTransitionEnd" - } - return transitionEnd - }()) - } - })() + $.support.transition = (function () { + var thisBody = document.body || document.documentElement + , thisStyle = thisBody.style + , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined -}) \ No newline at end of file + return support && { + end: (function () { + var transitionEnd = "TransitionEnd" + if ( $.browser.webkit ) { + transitionEnd = "webkitTransitionEnd" + } else if ( $.browser.mozilla ) { + transitionEnd = "transitionend" + } else if ( $.browser.opera ) { + transitionEnd = "oTransitionEnd" + } + return transitionEnd + }()) + } + })() + + }) + +}( window.jQuery ) \ No newline at end of file