aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJames Padolsey <jamespadolsey@gmail.com>2009-12-07 00:37:34 +0800
committerJohn Resig <jeresig@gmail.com>2009-12-07 16:11:46 +0800
commit93fdbeb963a9c350f807818c7cc99982942a92f3 (patch)
treedd782c485beda26b5de11ca967b6b3e9e14c7912 /test
parent62a34450c0961e461a72ce4d96f94551ef393b56 (diff)
downloadjquery-93fdbeb963a9c350f807818c7cc99982942a92f3.tar.gz
jquery-93fdbeb963a9c350f807818c7cc99982942a92f3.zip
Added support for per-property easing
Diffstat (limited to 'test')
-rw-r--r--test/unit/fx.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js
index 9b2f9d8b1..b95979938 100644
--- a/test/unit/fx.js
+++ b/test/unit/fx.js
@@ -586,3 +586,37 @@ test("jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function ()
start();
});
});
+
+test("animate with per-property easing", function(){
+
+ expect(3);
+ stop();
+
+ var _test1_called = false;
+ var _test2_called = false;
+ var _default_test_called = false;
+
+ jQuery.easing['_test1'] = function() {
+ _test1_called = true;
+ };
+
+ jQuery.easing['_test2'] = function() {
+ _test2_called = true;
+ };
+
+ jQuery.easing['_default_test'] = function() {
+ _default_test_called = true;
+ };
+
+ jQuery({a:0,b:0,c:0}).animate({
+ a: [100, '_test1'],
+ b: [100, '_test2'],
+ c: 100
+ }, 400, '_default_test', function(){
+ start();
+ ok(_test1_called, "Easing function (1) called");
+ ok(_test2_called, "Easing function (2) called");
+ ok(_default_test_called, "Easing function (_default) called");
+ });
+
+}); \ No newline at end of file