mirror of
https://github.com/twbs/bootstrap.git
synced 2025-04-06 23:57:36 +02:00
wrap transition
This commit is contained in:
parent
7ec4e91324
commit
593b062c7a
50
js/bootstrap-transition.js
vendored
50
js/bootstrap-transition.js
vendored
@ -17,31 +17,35 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
* ========================================================== */
|
* ========================================================== */
|
||||||
|
|
||||||
$(function () {
|
!function( $ ) {
|
||||||
|
|
||||||
"use strict"
|
$(function () {
|
||||||
|
|
||||||
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
"use strict"
|
||||||
* ======================================================= */
|
|
||||||
|
|
||||||
$.support.transition = (function () {
|
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
||||||
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 && {
|
$.support.transition = (function () {
|
||||||
end: (function () {
|
var thisBody = document.body || document.documentElement
|
||||||
var transitionEnd = "TransitionEnd"
|
, thisStyle = thisBody.style
|
||||||
if ( $.browser.webkit ) {
|
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
||||||
transitionEnd = "webkitTransitionEnd"
|
|
||||||
} else if ( $.browser.mozilla ) {
|
|
||||||
transitionEnd = "transitionend"
|
|
||||||
} else if ( $.browser.opera ) {
|
|
||||||
transitionEnd = "oTransitionEnd"
|
|
||||||
}
|
|
||||||
return transitionEnd
|
|
||||||
}())
|
|
||||||
}
|
|
||||||
})()
|
|
||||||
|
|
||||||
})
|
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 )
|
Loading…
x
Reference in New Issue
Block a user