Sha256: 62f5bfa8c2ae565b6058e2487acabf22b27623906f1950c23490f438e9644c68

Contents?: true

Size: 1.5 KB

Versions: 10

Compression:

Stored size: 1.5 KB

Contents

/* ========================================================================
 * 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);

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
spiderfw-0.6.39 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.38 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.37 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.35 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.34 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.33 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.32 apps/core/components/public/bootstrap_3/js/transition.js
spiderfw-0.6.31 apps/core/components/public/bootstrap_3/js/transition.js
aerogel-bootstrap-0.2.2 assets/javascripts/bootstrap/transition.js
bootstrap-sass-3.1.1.1 vendor/assets/javascripts/bootstrap/transition.js