git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6f51075
)
Fix for #1214, #1216, #1234 (problem with animations). In a nutshell, the callback...
author
John Resig
<jeresig@gmail.com>
Thu, 21 Jun 2007 02:38:16 +0000
(
02:38
+0000)
committer
John Resig
<jeresig@gmail.com>
Thu, 21 Jun 2007 02:38:16 +0000
(
02:38
+0000)
src/fx/fx.js
patch
|
blob
|
history
diff --git
a/src/fx/fx.js
b/src/fx/fx.js
index
dd5407c
..
51e8157
100644
(file)
--- a/
src/fx/fx.js
+++ b/
src/fx/fx.js
@@
-307,16
+307,15
@@
jQuery.fn.extend({
*/
animate: function( prop, speed, easing, callback ) {
return this.queue(function(){
*/
animate: function( prop, speed, easing, callback ) {
return this.queue(function(){
- var hidden = jQuery(this).is(":hidden");
+ var hidden = jQuery(this).is(":hidden"),
+ opt = jQuery.speed(speed, easing, callback),
+ self = this;
for ( var p in prop )
for ( var p in prop )
- if ( prop[p] == "hide" && hidden ||
- prop[p] == "show" && !hidden )
- return;
+ if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
+ return jQuery.isFunction(opt.complete) && opt.complete.apply(this);
this.curAnim = jQuery.extend({}, prop);
this.curAnim = jQuery.extend({}, prop);
- var opt = jQuery.speed(speed, easing, callback);
- var self = this;
jQuery.each( prop, function(name, val){
var e = new jQuery.fx( self, opt, name );
jQuery.each( prop, function(name, val){
var e = new jQuery.fx( self, opt, name );