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.32 vendor/assets/javascripts/_transition.js
active_frontend-12.4.31 vendor/assets/javascripts/_transition.js
active_frontend-12.4.30 vendor/assets/javascripts/_transition.js
active_frontend-12.4.29 vendor/assets/javascripts/_transition.js
active_frontend-12.4.28 vendor/assets/javascripts/_transition.js
active_frontend-12.4.27 vendor/assets/javascripts/_transition.js
active_frontend-12.4.26 vendor/assets/javascripts/_transition.js
active_frontend-12.4.25 vendor/assets/javascripts/_transition.js
active_frontend-12.4.24 vendor/assets/javascripts/_transition.js
active_frontend-12.4.23 vendor/assets/javascripts/_transition.js
active_frontend-12.4.22 vendor/assets/javascripts/_transition.js
active_frontend-12.4.21 vendor/assets/javascripts/_transition.js
active_frontend-12.4.20 vendor/assets/javascripts/_transition.js
active_frontend-12.4.19 vendor/assets/javascripts/_transition.js
active_frontend-12.4.18 vendor/assets/javascripts/_transition.js
active_frontend-12.4.17 vendor/assets/javascripts/_transition.js
active_frontend-12.4.16 vendor/assets/javascripts/_transition.js
active_frontend-12.4.15 vendor/assets/javascripts/_transition.js
active_frontend-12.4.14 vendor/assets/javascripts/_transition.js
active_frontend-12.4.13 vendor/assets/javascripts/_transition.js