Don't add "px" to unit-less properties when animating them. Fixes #4966.

This commit is contained in:
Anton M 2011-02-13 23:03:46 +01:00
parent dba8c20b4b
commit c5edf982d5
2 changed files with 12 additions and 2 deletions

10
test/unit/effects.js vendored
View file

@ -919,3 +919,13 @@ test("hide hidden elements, with animation (bug #7141)", function() {
});
});
});
test("animate unit-less properties (#4966)", 2, function() {
stop();
var div = jQuery( "<div style='z-index: 0'></div>" ).appendTo( "body" );
equal( div.css( "z-index" ), "0", "z-index is 0" );
div.animate({ zIndex: 2 }, function() {
equal( div.css( "z-index" ), "2", "z-index is 2" );
start();
});
});