]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects: Proper argument shuffling when calling show/hide/toggle without a speed.
authorScott González <scott.gonzalez@gmail.com>
Thu, 4 Mar 2010 01:31:17 +0000 (01:31 +0000)
committerScott González <scott.gonzalez@gmail.com>
Thu, 4 Mar 2010 01:31:17 +0000 (01:31 +0000)
Fixes #5269 - Show and hide effects errantly require "duration" option to fire callback.

ui/jquery.effects.core.js

index 2d0c873d441e619fe20aedf585fce2e77b53d815..ed7eb099e98e1ff82dead4959e15a195203c92d2 100644 (file)
@@ -418,6 +418,10 @@ function _normalizeArguments(effect, options, speed, callback) {
                speed = null;
                options = {};
        }
+       if ($.isFunction(speed)) {
+               callback = speed;
+               speed = null;
+       }
        if (typeof options == 'number' || $.fx.speeds[options]) {
                callback = speed;
                speed = options;