Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Landing pull request 409. Adds fillOpacity to internal cssNumber. Fix…
…es #9548.

More Details:
 - jquery#409
 - http://bugs.jquery.com/ticket/9548
  • Loading branch information
rwaldron authored and timmywil committed Jun 14, 2011
1 parent 13ceb0f commit 5eef591
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/css.js
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions test/unit/css.js
Expand Up @@ -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'");
});

});

0 comments on commit 5eef591

Please sign in to comment.