From 1e677f30f68d8ea41261aa666a9ba0720383e9d0 Mon Sep 17 00:00:00 2001 From: timmywil Date: Mon, 7 Nov 2011 10:46:46 -0500 Subject: Add back unit in the width/height step function. Fixes #10669. --- test/unit/effects.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') 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("
") + .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(); -- cgit v1.2.3