X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffx.js;h=67af1305db7f2952b95e284e4893df4ff409dced;hb=606b863edaff29035960e4d813b45d63b8d92876;hp=495fe17d33587700a79aa36337537814bc3ab393;hpb=e4a62e4ec60a1dc36274e5706b46faadf455bd16;p=jquery.git diff --git a/src/fx.js b/src/fx.js index 495fe17..67af130 100644 --- a/src/fx.js +++ b/src/fx.js @@ -111,9 +111,12 @@ jQuery.fn.extend({ } // If a +/- token was provided, we're doing a relative animation - if ( parts[1] && typeof val != "number" ) + if ( parts[1] ) end = ((parts[1] == "-" ? -1 : 1) * end) + start; + // Absolutely position numbers + if( typeof val == "number") end = val; + e.custom( start, end, unit ); } else e.custom( start, val, "" ); @@ -126,12 +129,12 @@ jQuery.fn.extend({ }, queue: function(type, fn){ - if ( !fn ) { + if ( jQuery.isFunction(type) ) { fn = type; type = "fx"; } - if ( !arguments.length ) + if ( !type || typeof type == "string" ) return queue( this[0], type ); return this.each(function(){