Sha256: 961bea260d9e87ad051a345c157d77a8d8263a8e8ff7302f897b0a92b8ad6ad0

Contents?: true

Size: 1.08 KB

Versions: 9

Compression:

Stored size: 1.08 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, $el = this
    $(this).one($.support.transition.end, function () { called = true })
    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
    setTimeout(callback, duration)
    return this
  }

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

}(jQuery);

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
flashgrid-2.0.1 vendor/assets/javascripts/transition.js
flashgrid-2.0.0 vendor/assets/javascripts/transition.js
flashgrid-1.3.0 vendor/assets/javascripts/transition.js
flashgrid-1.2.0 vendor/assets/javascripts/transition.js
flashgrid-1.1.2 vendor/assets/javascripts/transition.js
flashgrid-1.1.1 vendor/assets/javascripts/transition.js
flashgrid-1.1.0 vendor/assets/javascripts/transition.js
flashgrid-1.0.22 vendor/assets/javascripts/transition.js
flashgrid-1.0.21 vendor/assets/javascripts/transition.js