diff options
| author | Jonathan Barronville | 2014-06-07 19:13:28 -0400 | 
|---|---|---|
| committer | Jonathan Barronville | 2014-06-07 19:13:28 -0400 | 
| commit | b56e5c671ce89f1c8ddc67a4ac8d2f59de04ea85 (patch) | |
| tree | 80ce4d67ff46505dc1ec77b72daf7bed59abf8b4 /bower_components/bootstrap/js/transition.js | |
| parent | 67ad58c27c4a2704532246d044e1ecbae2a11022 (diff) | |
| download | sellevate-b56e5c671ce89f1c8ddc67a4ac8d2f59de04ea85.tar.bz2 | |
Yo.
Diffstat (limited to 'bower_components/bootstrap/js/transition.js')
| -rw-r--r-- | bower_components/bootstrap/js/transition.js | 48 | 
1 files changed, 48 insertions, 0 deletions
| diff --git a/bower_components/bootstrap/js/transition.js b/bower_components/bootstrap/js/transition.js new file mode 100644 index 0000000..efa8c17 --- /dev/null +++ b/bower_components/bootstrap/js/transition.js @@ -0,0 +1,48 @@ +/* ======================================================================== + * Bootstrap: transition.js v3.1.1 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { +  'use strict'; + +  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) +  // ============================================================ + +  function transitionEnd() { +    var el = document.createElement('bootstrap') + +    var transEndEventNames = { +      'WebkitTransition' : 'webkitTransitionEnd', +      'MozTransition'    : 'transitionend', +      'OTransition'      : 'oTransitionEnd otransitionend', +      'transition'       : 'transitionend' +    } + +    for (var name in transEndEventNames) { +      if (el.style[name] !== undefined) { +        return { end: transEndEventNames[name] } +      } +    } + +    return false // explicit for ie8 (  ._.) +  } + +  // http://blog.alexmaccaw.com/css-transitions +  $.fn.emulateTransitionEnd = function (duration) { +    var called = false, $el = this +    $(this).one($.support.transition.end, function () { called = true }) +    var callback = function () { if (!called) $($el).trigger($.support.transition.end) } +    setTimeout(callback, duration) +    return this +  } + +  $(function () { +    $.support.transition = transitionEnd() +  }) + +}(jQuery); | 
