X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Feffects.js;h=5d656c96cab20d0361c22f28afa2d460710199d8;hb=0d5bd174614fa278826ac4aaaa64342f17c0ae56;hp=c562d0335547a1a31f0ce5a3dc3b6637a30d373c;hpb=f0505c6d75722d5617dedfd5f6165285c18103c8;p=jquery.git diff --git a/src/effects.js b/src/effects.js index c562d03..5d656c9 100644 --- a/src/effects.js +++ b/src/effects.js @@ -108,6 +108,10 @@ jQuery.fn.extend({ animate: function( prop, speed, easing, callback ) { var optall = jQuery.speed(speed, easing, callback); + if ( jQuery.isEmptyObject( prop ) ) { + return this.each( optall.complete ); + } + return this[ optall.queue === false ? "each" : "queue" ](function() { var opt = jQuery.extend({}, optall), p, hidden = this.nodeType === 1 && jQuery(this).is(":hidden"), @@ -181,10 +185,6 @@ jQuery.fn.extend({ } }); - if ( jQuery.isEmptyObject( prop ) ) { - return optall.complete.call(this); - } - // For JS strict compliance return true; });