]> source.dussan.org Git - jquery.git/commitdiff
Landing pull request 409. Adds fillOpacity to internal cssNumber. Fixes #9548.
authorrwldrn <waldron.rick@gmail.com>
Tue, 14 Jun 2011 19:59:22 +0000 (15:59 -0400)
committertimmywil <tim.willison@thisismedium.com>
Tue, 14 Jun 2011 19:59:22 +0000 (15:59 -0400)
More Details:
 - https://github.com/jquery/jquery/pull/409
 - http://bugs.jquery.com/ticket/9548

src/css.js
test/unit/css.js

index fcc784d294e64de74a5ae62b8aaefe3a2aaf990f..c60bcdde040d421be86048fe15bdf30f41842a2c 100644 (file)
@@ -50,13 +50,14 @@ jQuery.extend({
 
        // Exclude the following css properties to add px
        cssNumber: {
-               "zIndex": true,
+               "fillOpacity": true,
                "fontWeight": true,
-               "opacity": true,
-               "zoom": true,
                "lineHeight": true,
+               "opacity": true,
+               "orphans": true,
                "widows": true,
-               "orphans": true
+               "zIndex": true,
+               "zoom": true
        },
 
        // Add in properties whose names you wish to fix before
index e631f49625db46adc474155e0f8257462f569044..f421f7bd4bc54b451149c3b1ec358f0d2cf1e74f 100644 (file)
@@ -475,3 +475,13 @@ test("widows & orphans #8936", function () {
 
        $p.remove();
 });
+
+test("Do not append px to 'fill-opacity' #9548", 1, function() {
+
+       var $div = jQuery("<div>").appendTo("#qunit-fixture");
+
+       $div.css("fill-opacity", 0).animate({ "fill-opacity": 1.0 }, 0, function () {
+               equal( jQuery(this).css("fill-opacity"), 1, "Do not append px to 'fill-opacity'");
+       });
+
+});