git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
b0fe380
)
Made sure that animate callbacks get executed even when no properties are passed...
author
John Resig
<jeresig@gmail.com>
Sat, 7 Nov 2009 16:22:35 +0000
(17:22 +0100)
committer
John Resig
<jeresig@gmail.com>
Sat, 7 Nov 2009 16:22:35 +0000
(17:22 +0100)
src/fx.js
patch
|
blob
|
history
test/unit/fx.js
patch
|
blob
|
history
diff --git
a/src/fx.js
b/src/fx.js
index
24d2841
..
801d92c
100644
(file)
--- a/
src/fx.js
+++ b/
src/fx.js
@@
-164,6
+164,10
@@
jQuery.fn.extend({
}
});
}
});
+ if ( jQuery.isEmptyObject( prop ) ) {
+ return optall.complete.call(this);
+ }
+
// For JS strict compliance
return true;
});
// For JS strict compliance
return true;
});
@@
-427,4
+431,4
@@
if ( jQuery.expr && jQuery.expr.filters ) {
return elem === fn.elem;
}).length;
};
return elem === fn.elem;
}).length;
};
-}
\ No newline at end of file
+}
diff --git
a/test/unit/fx.js
b/test/unit/fx.js
index
c47fe55
..
c2bf6b4
100644
(file)
--- a/
test/unit/fx.js
+++ b/
test/unit/fx.js
@@
-67,6
+67,18
@@
test("animate option (queue === false)", function () {
});
*/
});
*/
+test("animate with no properties", function() {
+ expect(1);
+
+ var divs = jQuery("div"), count = 0;
+
+ divs.animate({}, function(){
+ count++;
+ });
+
+ equals( divs.length, count, "Make sure that callback is called for each element in the set." );
+});
+
test("animate duration 0", function() {
expect(7);
test("animate duration 0", function() {
expect(7);