Merge pull request #605 from jabranr/update-jquery-plugin-example

Replace unnecessary jQuery $(this) to this
This commit is contained in:
Daniel Eden 2016-09-02 08:36:18 -07:00 committed by GitHub
commit f4ac5f2889
1 changed files with 1 additions and 1 deletions

View File

@ -156,7 +156,7 @@ You can also extend jQuery to add a function that does it all for you:
$.fn.extend({
animateCss: function (animationName) {
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$(this).addClass('animated ' + animationName).one(animationEnd, function() {
this.addClass('animated ' + animationName).one(animationEnd, function() {
$(this).removeClass('animated ' + animationName);
});
}