Skip to content

Commit

Permalink
Changed the fx.stop() function to only apply the stop if there seems …
Browse files Browse the repository at this point in the history
…to be an animation in progress and to reset the cached animation info to empty.
  • Loading branch information
sxross committed Mar 10, 2012
1 parent bcf81f4 commit ce70d6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fx.js
Expand Up @@ -35,7 +35,10 @@
};

$.fn.stop = function(){
this.one(cachedAnimation.endEvent, cachedAnimation.callback);
if(cachedAnimation.callback && cachedAnimation.endEvent){
this.one(cachedAnimation.endEvent, cachedAnimation.callback);
}
cachedAnimation = {};
}

$.fn.anim = function(properties, duration, ease, callback){
Expand Down

2 comments on commit ce70d6a

@jashwant
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get an error cacheAnimation not defined when I use this.

@sxross
Copy link
Owner Author

@sxross sxross commented on ce70d6a Apr 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fork is not keeping up with the current master. I would check master to see whether the problem was solved a different way.

Please sign in to comment.