Created
February 24, 2014 15:25
-
-
Save paulozoom/9190347 to your computer and use it in GitHub Desktop.
Animate.css jQuery plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$.fn.animateCss = function(animation, onEndCallback) { | |
return this.each(function() { | |
$(this) | |
.addClass("animated "+animation) | |
.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { | |
$(this).removeClass(animation); | |
if (typeof onEndCallback === 'function') { onEndCallback(); } | |
}); | |
}); | |
} | |
}(jQuery)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment