Sha256: f22eb1ef51e3b2dcff57551a8d165c148ed17dce8a86a8730a22587e553367ad

Contents?: true

Size: 1.36 KB

Versions: 191

Compression:

Stored size: 1.36 KB

Contents

+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

191 entries across 191 versions & 2 rubygems

Version Path
active_frontend-12.4.12 vendor/assets/javascripts/_transition.js
active_frontend-12.4.11 vendor/assets/javascripts/_transition.js
active_frontend-12.4.10 vendor/assets/javascripts/_transition.js
active_frontend-12.4.9 vendor/assets/javascripts/_transition.js
active_frontend-12.4.8 vendor/assets/javascripts/_transition.js
active_frontend-12.4.7 vendor/assets/javascripts/_transition.js
active_frontend-12.4.6 vendor/assets/javascripts/_transition.js
active_frontend-12.4.5 vendor/assets/javascripts/_transition.js
active_frontend-12.4.4 vendor/assets/javascripts/_transition.js
active_frontend-12.4.3 vendor/assets/javascripts/_transition.js
active_frontend-12.4.2 vendor/assets/javascripts/_transition.js
active_frontend-12.4.1 vendor/assets/javascripts/_transition.js
active_frontend-12.4.0 vendor/assets/javascripts/_transition.js
active_frontend-12.3.0 vendor/assets/javascripts/_transition.js
active_frontend-12.2.0 vendor/assets/javascripts/_transition.js
active_frontend-12.1.37 vendor/assets/javascripts/_transition.js
active_frontend-12.1.36 vendor/assets/javascripts/_transition.js
active_frontend-12.1.35 vendor/assets/javascripts/_transition.js
active_frontend-12.1.34 vendor/assets/javascripts/_transition.js
active_frontend-12.1.33 vendor/assets/javascripts/_transition.js