mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-19 16:54:24 +01:00
simplify transition plugin a little
This commit is contained in:
parent
30b3f47e31
commit
422d04cb2b
Binary file not shown.
11
docs/assets/js/bootstrap-transition.js
vendored
11
docs/assets/js/bootstrap-transition.js
vendored
@ -29,12 +29,8 @@
|
||||
|
||||
$.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
|
||||
var transitionEnd = (function () {
|
||||
|
||||
return support && {
|
||||
end: (function () {
|
||||
var el = document.createElement('bootstrap')
|
||||
, transEndEventNames = {
|
||||
'WebkitTransition' : 'webkitTransitionEnd'
|
||||
@ -51,9 +47,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
}())
|
||||
})()
|
||||
|
||||
return transitionEnd && {
|
||||
end: transitionEnd
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
})
|
||||
|
11
js/bootstrap-transition.js
vendored
11
js/bootstrap-transition.js
vendored
@ -29,12 +29,8 @@
|
||||
|
||||
$.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
|
||||
var transitionEnd = (function () {
|
||||
|
||||
return support && {
|
||||
end: (function () {
|
||||
var el = document.createElement('bootstrap')
|
||||
, transEndEventNames = {
|
||||
'WebkitTransition' : 'webkitTransitionEnd'
|
||||
@ -51,9 +47,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
}())
|
||||
})()
|
||||
|
||||
return transitionEnd && {
|
||||
end: transitionEnd
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user