From bcc50932f5e1dedc1ffa92829b4abd32c9eed192 Mon Sep 17 00:00:00 2001 From: Hannes Johansson Date: Wed, 16 Oct 2013 11:27:24 +0200 Subject: [PATCH 1/2] Fixed test syntax for complete callback. Complete should be passed in the second (the options) parameter --- test/index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/index.html b/test/index.html index 7a847a8..416b781 100644 --- a/test/index.html +++ b/test/index.html @@ -138,9 +138,13 @@

jQuery transit tests

}); test('as "complete"', function($box) { - $box.transition({ - rotate: 45, - complete: function() { $box.html('OK'); } + $box.transition( + { + rotate: 45 + }, + { + complete: function() { $box.html('OK'); + } }); }); From 87513bbcfbd19871da49f750647d985a5d96bce7 Mon Sep 17 00:00:00 2001 From: Hannes Johansson Date: Fri, 18 Oct 2013 14:39:30 +0200 Subject: [PATCH 2/2] Fixed documentation to be correct in regards to jquery.animate --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e08ff6..deaeb2c 100644 --- a/README.md +++ b/README.md @@ -84,11 +84,13 @@ $("#box").transition({ opacity: 0.1, scale: 0.3 }, function() {..}); $("#box").transition({ opacity: 0.1, scale: 0.3 }, 500, 'in', function() {..}); // everything ``` -You can also pass *duration* and *easing* and *complete* as values in `options`, just like in `$.fn.animate()`. +You can also pass *duration* and *easing* and *complete* as values in a second parameter, just like in `$.fn.animate()`. ``` javascript $("#box").transition({ - opacity: 0.1, scale: 0.3, + opacity: 0.1, + scale: 0.3, +}, { duration: 500, easing: 'in', complete: function() { /* ... */ }