r2109 - trunk/ui

r2109 - trunk/ui


Author: paul.bakaus
Date: Thu Feb 19 05:25:02 2009
New Revision: 2109
Modified:
trunk/ui/effects.core.js
Log:
effects core: the second argument passed to effect methods wasn't checked
for being a callback function (fixes #4181 - Effects methods don't allow
callback as the second parameter)
Modified: trunk/ui/effects.core.js
==============================================================================
--- trunk/ui/effects.core.js    (original)
+++ trunk/ui/effects.core.js    Thu Feb 19 05:25:02 2009
@@ -136,7 +136,7 @@
    var o = a[1] && a[1].constructor == Object ? a[1] : {}; if(m) o.mode = m;
    var speed = a[1] && a[1].constructor != Object ? a[1] : (o.duration ?
o.duration : a[2]); //either comes from options.duration or the secon/third
argument
        speed = $.fx.off ? 0 : typeof speed === "number" ? speed :
$.fx.speeds[speed] || $.fx.speeds._default;
-    var callback = o.callback || ( $.isFunction(a[2]) && a[2] ) || (
$.isFunction(a[3]) && a[3] );
+    var callback = o.callback || ( $.isFunction(a[1]) && a[1] ) || (
$.isFunction(a[2]) && a[2] ) || ( $.isFunction(a[3]) && a[3] );
    return [a[0], o, speed, callback];