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-10.2.9 vendor/assets/javascripts/_transition.js
active_frontend-10.2.8 vendor/assets/javascripts/_transition.js
active_frontend-10.2.7 vendor/assets/javascripts/_transition.js
active_frontend-10.2.6 vendor/assets/javascripts/_transition.js
active_frontend-10.2.5 vendor/assets/javascripts/_transition.js
active_frontend-10.2.4 vendor/assets/javascripts/_transition.js
active_frontend-10.2.3 vendor/assets/javascripts/_transition.js
active_frontend-10.2.2 vendor/assets/javascripts/_transition.js
active_frontend-10.2.1 vendor/assets/javascripts/_transition.js
active_frontend-10.2.0 vendor/assets/javascripts/_transition.js
active_frontend-10.1.2 vendor/assets/javascripts/_transition.js
active_frontend-10.1.1 vendor/assets/javascripts/_transition.js
active_frontend-10.1.0 vendor/assets/javascripts/transition.js
active_frontend-10.0.0 vendor/assets/javascripts/transition.js
active_frontend-9.1.1 vendor/assets/javascripts/transition.js
active_frontend-9.1.0 vendor/assets/javascripts/transition.js
active_frontend-9.0.1 vendor/assets/javascripts/transition.js
active_frontend-9.0.0 vendor/assets/javascripts/transition.js
active_frontend-8.0.1 vendor/assets/javascripts/transition.js
active_frontend-8.0.0 vendor/assets/javascripts/transition.js