0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-13 01:08:58 +01:00
Bootstrap/js/bootstrap-transition.js

51 lines
1.8 KiB
JavaScript
Raw Normal View History

/* ===================================================
2012-02-17 07:42:38 +01:00
* bootstrap-transition.js v2.0.1
2012-01-24 20:08:03 +01:00
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
2012-01-15 08:28:48 +01:00
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
2012-01-17 19:32:25 +01:00
!function( $ ) {
2012-01-17 19:32:25 +01:00
$(function () {
2011-12-22 02:38:05 +01:00
2012-01-17 19:32:25 +01:00
"use strict"
2012-01-17 19:32:25 +01:00
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
2012-01-17 19:32:25 +01:00
$.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
2012-01-17 19:32:25 +01:00
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
}())
}
})()
})
2012-02-14 03:41:02 +01:00
}( window.jQuery );