Commit 8ea8c312 authored by Jacob Thornton's avatar Jacob Thornton

replace UA sniffing

parent 2bbc9a1c
...@@ -24,28 +24,35 @@ ...@@ -24,28 +24,35 @@
"use strict" "use strict"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874) /* CSS TRANSITION SUPPORT (technique from http://www.modernizr.com/)
* ======================================================= */ * ======================================================= */
$.support.transition = (function () { $.support.transition = (function () {
var thisBody = document.body || document.documentElement var thisBody = document.body || document.documentElement
, thisStyle = thisBody.style , thisStyle = thisBody.style
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
return support && { return support && {
end: (function () { end: (function () {
var transitionEnd = "TransitionEnd" var el = document.createElement('bootstrap')
if ( $.browser.webkit ) { , transEndEventNames = {
transitionEnd = "webkitTransitionEnd" 'WebkitTransition' : 'webkitTransitionEnd'
} else if ( $.browser.mozilla ) { , 'MozTransition' : 'transitionend'
transitionEnd = "transitionend" , 'OTransition' : 'oTransitionEnd'
} else if ( $.browser.msie ) { , 'msTransition' : 'MsTransitionEnd'
transitionEnd = "MSTransitionEnd" , 'transition' : 'transitionend'
} else if ( $.browser.opera ) { }
transitionEnd = "oTransitionEnd" , name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
} }
return transitionEnd
}()) }())
} }
})() })()
......
...@@ -24,28 +24,35 @@ ...@@ -24,28 +24,35 @@
"use strict" "use strict"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874) /* CSS TRANSITION SUPPORT (technique from http://www.modernizr.com/)
* ======================================================= */ * ======================================================= */
$.support.transition = (function () { $.support.transition = (function () {
var thisBody = document.body || document.documentElement var thisBody = document.body || document.documentElement
, thisStyle = thisBody.style , thisStyle = thisBody.style
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
return support && { return support && {
end: (function () { end: (function () {
var transitionEnd = "TransitionEnd" var el = document.createElement('bootstrap')
if ( $.browser.webkit ) { , transEndEventNames = {
transitionEnd = "webkitTransitionEnd" 'WebkitTransition' : 'webkitTransitionEnd'
} else if ( $.browser.mozilla ) { , 'MozTransition' : 'transitionend'
transitionEnd = "transitionend" , 'OTransition' : 'oTransitionEnd'
} else if ( $.browser.msie ) { , 'msTransition' : 'MsTransitionEnd'
transitionEnd = "MSTransitionEnd" , 'transition' : 'transitionend'
} else if ( $.browser.opera ) { }
transitionEnd = "oTransitionEnd" , name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
} }
return transitionEnd
}()) }())
} }
})() })()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment