Sha256: 4c4992c0cea541a09ca27f2fff93f9b0cbb4ad28065af1ffccf711f53b67f976

Contents?: true

Size: 1.79 KB

Versions: 25

Compression:

Stored size: 1.79 KB

Contents

/* ========================================================================
 * Bootstrap: transition.js v3.3.6
 * http://getbootstrap.com/javascript/#transitions
 * ========================================================================
 * Copyright 2011-2015 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
    var $el = this
    $(this).one('bsTransitionEnd', function () { called = true })
    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
    setTimeout(callback, duration)
    return this
  }

  $(function () {
    $.support.transition = transitionEnd()

    if (!$.support.transition) return

    $.event.special.bsTransitionEnd = {
      bindType: $.support.transition.end,
      delegateType: $.support.transition.end,
      handle: function (e) {
        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
      }
    }
  })

}(jQuery);

Version data entries

25 entries across 25 versions & 11 rubygems

Version Path
twitter-bootstrap-rails-5.0.0 app/assets/javascripts/twitter/bootstrap/transition.js
twitter-bootstrap-rails-4.0.0 app/assets/javascripts/twitter/bootstrap/transition.js
mdarray-sol-0.1.0-java node_modules/bootstrap/js/transition.js
jabysoft-base-0.1.5 vendor/assets/javascripts/bootstrap/transition.js
bootstrap_farsi-3.3.6 app/assets/javascripts/twitter/bootstrap/transition.js
jabysoft-base-0.1.4 vendor/assets/javascripts/bootstrap/transition.js
twbs_sass_rails-4.3.1 vendor/assets/javascripts/twbs/bootstrap/transition.js
honoka-rails-3.3.6.4 assets/javascripts/bootstrap/transition.js
twbs_sass_rails-4.3.0 vendor/assets/javascripts/twbs/bootstrap/transition.js
twbs_sass_rails-4.2.0 vendor/assets/javascripts/twbs/bootstrap/transition.js
statixite-1.0.2 vendor/assets/bower_components/bootstrap/js/transition.js
statixite-1.0.1 vendor/assets/bower_components/bootstrap/js/transition.js
twbs_sass_rails-4.1.0 vendor/assets/javascripts/twbs/bootstrap/transition.js
bootswatch-sass-3.3.6.1 assets/javascripts/bootstrap/transition.js
twbs_sass_rails-4.0.1 vendor/assets/javascripts/twbs/bootstrap/transition.js
statixite-1.0.0 vendor/assets/bower_components/bootstrap/js/transition.js
honoka-rails-3.3.6.3 assets/javascripts/bootstrap/transition.js
npm2gem-0.1.1 spec/dummy/node_modules/bootstrap/js/transition.js
npm2gem-0.1.0 spec/dummy/node_modules/bootstrap/js/transition.js
honoka-rails-3.3.6.2 assets/javascripts/bootstrap/transition.js