aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authortimmywil <timmywillisn@gmail.com>2011-11-07 10:46:46 -0500
committertimmywil <timmywillisn@gmail.com>2011-11-07 10:47:09 -0500
commit1e677f30f68d8ea41261aa666a9ba0720383e9d0 (patch)
tree1606f1e49c2a609261ac61cf3fa299cd515d5485 /test
parenta7e911b7fe84a35234d4be18102e168c6644e40d (diff)
downloadjquery-1e677f30f68d8ea41261aa666a9ba0720383e9d0.tar.gz
jquery-1e677f30f68d8ea41261aa666a9ba0720383e9d0.zip
Add back unit in the width/height step function. Fixes #10669.
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 36335c43f..82067cb8b 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -324,6 +324,21 @@ test("animate table-cell width/height", function() {
});
});
+test("animate percentage(%) on width/height", function() {
+ expect( 2 );
+
+ var $div = jQuery("<div style='position:absolute;top:-999px;left:-999px;width:60px;height:60px;'><div style='width:50%;height:50%;'></div></div>")
+ .appendTo("#qunit-fixture").children("div");
+
+ stop();
+ $div.animate({ width: "25%", height: "25%" }, 13, function() {
+ var $this = jQuery(this);
+ equal( $this.width(), 15, "Width was animated to 15px rather than 25px");
+ equal( $this.height(), 15, "Height was animated to 15px rather than 25px");
+ start();
+ });
+});
+
test("animate resets overflow-x and overflow-y when finished", function() {
expect(2);
stop();