1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-13 00:54:04 +02:00

simplify transition plugin a little

This commit is contained in:
Jacob Thornton
2012-03-29 13:51:23 -07:00
parent 30b3f47e31
commit 422d04cb2b
3 changed files with 36 additions and 38 deletions

Binary file not shown.

View File

@@ -29,12 +29,8 @@
$.support.transition = (function () { $.support.transition = (function () {
var thisBody = document.body || document.documentElement var transitionEnd = (function () {
, thisStyle = thisBody.style
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
return support && {
end: (function () {
var el = document.createElement('bootstrap') var el = document.createElement('bootstrap')
, transEndEventNames = { , transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd' 'WebkitTransition' : 'webkitTransitionEnd'
@@ -51,9 +47,12 @@
} }
} }
}()) })()
return transitionEnd && {
end: transitionEnd
} }
})() })()
}) })

View File

@@ -29,12 +29,8 @@
$.support.transition = (function () { $.support.transition = (function () {
var thisBody = document.body || document.documentElement var transitionEnd = (function () {
, thisStyle = thisBody.style
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
return support && {
end: (function () {
var el = document.createElement('bootstrap') var el = document.createElement('bootstrap')
, transEndEventNames = { , transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd' 'WebkitTransition' : 'webkitTransitionEnd'
@@ -51,9 +47,12 @@
} }
} }
}()) })()
return transitionEnd && {
end: transitionEnd
} }
})() })()
}) })