X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=fx%2Ffx.js;h=e8474a8c2a8f8afc4a35326a12fc9a819d8eb3ea;hb=4531ab13243f5e94e1ecfbd55e992842666d08aa;hp=bab2074dbd0b2ab88a8870d06f0dcaeee2fca34a;hpb=6ae392a4e57834224b2a686d774ab210da25daa5;p=jquery.git diff --git a/fx/fx.js b/fx/fx.js index bab2074..e8474a8 100644 --- a/fx/fx.js +++ b/fx/fx.js @@ -84,7 +84,7 @@ jQuery.prototype.animate = function(prop,speed,callback) { return this.queue(function(){ var i = 0; for ( var p in prop ) { - var e = new fx( this, jQuery.speed(speed,callback,i++), p ); + var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else @@ -100,7 +100,7 @@ jQuery.speed = function(s,o,i) { o = { complete: o }; var ss = {"slow":600,"fast":200}; - o.duration = s.constructor == Number ? s : ss[s] || 400; + o.duration = (s && s.constructor == Number ? s : ss[s]) || 400; // Queueing o.oldComplete = o.complete; @@ -263,7 +263,7 @@ jQuery.fx = function( elem, options, prop ){ jQuery.setAuto( z.el, prop ); // If a callback was provided, execute it - if( z.o.complete.constructor == Function ) { + if( z.o.complete && z.o.complete.constructor == Function ) { // Yes, this is a weird place for this, but it needs to be executed // only once per cluster of effects.