Sha256: 2e96cf427253878077290f42c38f059edd1a21ff6b7eaab9c905fa73d1dd3f94

Contents?: true

Size: 546 Bytes

Versions: 19

Compression:

Stored size: 546 Bytes

Contents

$ = jQuery
$.fn.extend
  afterAnimation: (fn) ->
    $(this).bind 'oanimationend animationend webkitAnimationEnd otransitionend transitionend webkitTransitionEnd', fn

  afterTransitionForAddingClass: (className, fn) ->
    unless $(this).hasClass('active')
      $(this)
        .toggleClass('active', true)
        .afterAnimation(fn)
    else
      fn()

  afterTransitionForRemovingClass: (className, fn) ->
    if $(this).hasClass('active')
      $(this)
        .toggleClass('active', false)
        .afterAnimation(fn)
    else
      fn()

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ela-4.1.6 app/js/vendor/jquery.after-transition.coffee
ela-4.1.5 app/js/vendor/jquery.after-transition.coffee
ela-4.1.4 app/js/vendor/jquery.after-transition.coffee
ela-4.1.3 app/js/vendor/jquery.after-transition.coffee
ela-4.1.2 app/js/vendor/jquery.after-transition.coffee
ela-4.1.1 app/js/vendor/jquery.after-transition.coffee
ela-4.1.0 app/js/vendor/jquery.after-transition.coffee
ela-4.0.0 app/js/vendor/jquery.after-transition.coffee
ela-3.4.3 app/js/vendor/jquery.after-transition.coffee
ela-3.4.2 app/js/vendor/jquery.after-transition.coffee
ela-3.4.0 app/js/vendor/jquery.after-transition.coffee
ela-3.3.1 app/js/vendor/jquery.after-transition.coffee
ela-3.3.0 app/js/vendor/jquery.after-transition.coffee
ela-3.2.0 app/js/vendor/jquery.after-transition.coffee
ela-3.1.1 app/js/vendor/jquery.after-transition.coffee
ela-3.1.0 app/js/vendor/jquery.after-transition.coffee
ela-3.0.0 app/js/vendor/jquery.after-transition.coffee
ela-2.0.0 app/js/vendor/jquery.after-transition.coffee
ela-1.1.0 app/js/vendor/jquery.after-transition.coffee