diff --git a/README.md b/README.md index f7d4a4f..ee5ee8b 100644 --- a/README.md +++ b/README.md @@ -156,8 +156,8 @@ 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).removeClass('animated ' + animationName); + this.addClass('animated ' + animationName).one(animationEnd, function() { + this.removeClass('animated ' + animationName); }); } });