aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwldrn <waldron.rick@gmail.com>2011-06-14 15:59:22 -0400
committertimmywil <tim.willison@thisismedium.com>2011-06-14 15:59:22 -0400
commit5eef5917fdb399ace2698154c4cd7bbd24f13182 (patch)
treef49e1a593fa4880032cafaf1ecfebb528a7ee66b
parent13ceb0f56b380b395ed5a26b468bf2bf00d88216 (diff)
downloadjquery-5eef5917fdb399ace2698154c4cd7bbd24f13182.tar.gz
jquery-5eef5917fdb399ace2698154c4cd7bbd24f13182.zip
Landing pull request 409. Adds fillOpacity to internal cssNumber. Fixes #9548.
More Details: - https://github.com/jquery/jquery/pull/409 - http://bugs.jquery.com/ticket/9548
-rw-r--r--src/css.js9
-rw-r--r--test/unit/css.js10
2 files changed, 15 insertions, 4 deletions
diff --git a/src/css.js b/src/css.js
index fcc784d29..c60bcdde0 100644
--- a/src/css.js
+++ b/src/css.js
@@ -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
diff --git a/test/unit/css.js b/test/unit/css.js
index e631f4962..f421f7bd4 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -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'");
+ });
+
+});