Sha256: 4033fd36364f12238e22bd2917290543fdc1eeeb7f70faffdbd7ee836ac485df

Contents?: true

Size: 1.03 KB

Versions: 34

Compression:

Stored size: 1.03 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] }
      }
    }
  }

  // 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

34 entries across 34 versions & 2 rubygems

Version Path
flashoff-0.0.14 vendor/assets/javascripts/transition.js
flashoff-0.0.13 vendor/assets/javascripts/transition.js
flashoff-0.0.12 vendor/assets/javascripts/transition.js
flashoff-0.0.11 vendor/assets/javascripts/transition.js
flashoff-0.0.10 vendor/assets/javascripts/transition.js
flashoff-0.0.9 vendor/assets/javascripts/transition.js
flashoff-0.0.8 vendor/assets/javascripts/transition.js
flashoff-0.0.7 vendor/assets/javascripts/transition.js
flashoff-0.0.6 vendor/assets/javascripts/transition.js
flashoff-0.0.5 vendor/assets/javascripts/transition.js
flashoff-0.0.4 vendor/assets/javascripts/transition.js
flashoff-0.0.3 vendor/assets/javascripts/transition.js
flashoff-0.0.2 vendor/assets/javascripts/transition.js
flashoff-0.0.1 vendor/assets/javascripts/transition.js