diff --git a/js/bootstrap-transition.js b/js/bootstrap-transition.js
index f5226f96dec8c17fe551be0056cb5f249c1b4061..4317c8c7a067e0b2491d51ab15162a6a487141f0 100644
--- a/js/bootstrap-transition.js
+++ b/js/bootstrap-transition.js
@@ -29,22 +29,21 @@
     $.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
-
-      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
-        }())
+        , transition = 'transition WebkitTransition MozTransition OTransition MsTransition'.split(' ')
+        , transitionEnd = 'TransitionEnd webkitTransitionEnd transitionend oTransitionend MSTransitionEnd'.split(' ')
+        , i = transition.length
+        , support = false
+      while (i--) {
+        if (transition[i] in thisStyle) {
+          support = transition[i]
+          transitionEnd = transitionEnd[i]
+          break
+        }
       }
-    })()
+
+      return support && { end: transitionEnd }
+      
+    }())
 
   })