aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/fx.js
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-11-16 17:49:12 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-11-16 17:49:12 +0000
commit1d299d375b6d97d65559286d914df2d5a77949db (patch)
treee9ef1821d80db518c8703d784178917e8789f012 /test/unit/fx.js
parentab96367f121a5cdbe491fafb35cb041055a28a52 (diff)
downloadjquery-1d299d375b6d97d65559286d914df2d5a77949db.tar.gz
jquery-1d299d375b6d97d65559286d914df2d5a77949db.zip
Fix for #1823 bug in animate {queue:false} plus a unit test.
Diffstat (limited to 'test/unit/fx.js')
-rw-r--r--test/unit/fx.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js
index 1f9e674a1..6c5bb55cb 100644
--- a/test/unit/fx.js
+++ b/test/unit/fx.js
@@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() {
});
});
+test("animate option (queue === false)", function () {
+ expect(1);
+ stop();
+
+ var order = [];
+
+ var $foo = $("#foo");
+ $foo.animate({width:'100px'}, 200, function () {
+ // should finish after unqueued animation so second
+ order.push(2);
+ });
+ $foo.animate({fontSize:'2em'}, {queue:false, duration:10, complete:function () {
+ // short duration and out of queue so should finish first
+ order.push(1);
+ }});
+ $foo.animate({height:'100px'}, 10, function() {
+ // queued behind the first animation so should finish third
+ order.push(3);
+ isSet( order, [ 1, 2, 3] );
+ start();
+ });
+});
+
test("stop()", function() {
expect(3);
stop();