Sha256: 887138eac803148e0f2f90a3223e58006f391786b7272966aaf1936a6bb44d0c

Contents?: true

Size: 1.22 KB

Versions: 246

Compression:

Stored size: 1.22 KB

Contents

+function ($) {
  'use strict';

  // CSS TRANSITION SUPPORT
  // ======================

  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;
  }

  $.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

246 entries across 246 versions & 1 rubygems

Version Path
active_frontend-18.0.1 vendor/assets/javascripts/base/_transition.js
active_frontend-18.0.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.7.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.6.3 vendor/assets/javascripts/base/_transition.js
active_frontend-17.6.2 vendor/assets/javascripts/base/_transition.js
active_frontend-17.6.1 vendor/assets/javascripts/base/_transition.js
active_frontend-17.6.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.5.1 vendor/assets/javascripts/base/_transition.js
active_frontend-17.5.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.4.1 vendor/assets/javascripts/base/_transition.js
active_frontend-17.4.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.3.1 vendor/assets/javascripts/base/_transition.js
active_frontend-17.3.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.2.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.1.4 vendor/assets/javascripts/base/_transition.js
active_frontend-17.1.3 vendor/assets/javascripts/base/_transition.js
active_frontend-17.1.2 vendor/assets/javascripts/base/_transition.js
active_frontend-17.1.1 vendor/assets/javascripts/base/_transition.js
active_frontend-17.1.0 vendor/assets/javascripts/base/_transition.js
active_frontend-17.0.4 vendor/assets/javascripts/base/_transition.js