X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffx%2Ffx.js;h=ca861b6bdc2e766e3dedba1328216c80649501a6;hb=f2f399dcd552e73f68c9e8adfe26ef7995724cb3;hp=4c38413ef374b5fee88b1fa43fba83b6a845ae17;hpb=12ebfa3b01847f277aa6630e76697d5cd09560d0;p=jquery.git diff --git a/src/fx/fx.js b/src/fx/fx.js index 4c38413..ca861b6 100644 --- a/src/fx/fx.js +++ b/src/fx/fx.js @@ -336,10 +336,13 @@ jQuery.fn.extend({ jQuery.each( prop, function(name, val){ var e = new jQuery.fx( self, opt, name ); if ( val.constructor == Number ) - e.custom( e.cur(), val ); + e.custom( e.cur() || 0, val ); else e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop ); }); + + // For JS strict compliance + return true; }); }, @@ -376,7 +379,7 @@ jQuery.extend({ complete: fn || !fn && easing || jQuery.isFunction( speed ) && speed, duration: speed, - easing: fn && easing || easing && easing.constructor != Function && easing || (jQuery.easing.swing ? "swing" : "linear") + easing: fn && easing || easing && easing.constructor != Function && easing }; opt.duration = (opt.duration && opt.duration.constructor == Number ? @@ -443,7 +446,10 @@ jQuery.extend({ jQuery.attr(y, "opacity", z.now); // Let attr handle opacity else { y[prop] = parseInt(z.now) + "px"; - y.display = "block"; // Set display property to block for animation + + // Set display property to block for height/width animations + if ( prop == "height" || prop == "width" ) + y.display = "block"; } }; @@ -564,7 +570,7 @@ jQuery.extend({ var p = n / options.duration; // Perform the easing function, defaults to swing - z.now = jQuery.easing[options.easing](p, n, firstNum, (lastNum-firstNum), options.duration); + z.now = jQuery.easing[options.easing || (jQuery.easing.swing ? "swing" : "linear")](p, n, firstNum, (lastNum-firstNum), options.duration); // Perform the next step of the animation z.a();