bootstrap-transition.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* ===================================================
  2. * bootstrap-transition.js v2.0.2
  3. * http://twitter.github.com/bootstrap/javascript.html#transitions
  4. * ===================================================
  5. * Copyright 2012 Twitter, Inc.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * ========================================================== */
  19. !function( $ ) {
  20. $(function () {
  21. "use strict"
  22. /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
  23. * ======================================================= */
  24. $.support.transition = (function () {
  25. var thisBody = document.body || document.documentElement
  26. , thisStyle = thisBody.style
  27. , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
  28. return support && {
  29. end: (function () {
  30. var transitionEnd = "TransitionEnd"
  31. if ( $.browser.webkit ) {
  32. transitionEnd = "webkitTransitionEnd"
  33. } else if ( $.browser.mozilla ) {
  34. transitionEnd = "transitionend"
  35. } else if ( $.browser.opera ) {
  36. transitionEnd = "oTransitionEnd"
  37. }
  38. return transitionEnd
  39. }())
  40. }
  41. })()
  42. })
  43. }( window.jQuery );