Permalink
Browse files

Change step._default to detect cssHooks and use them

Add a few column CSS properties to cssNumber
  • Loading branch information...
1 parent a29d482 commit 5047770776029a471b52031bd2e1a30fa22fa0ae Brendan Byrd committed Apr 9, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −0 src/css.js
  2. +3 −5 src/effects.js
View
2 src/css.js
@@ -47,6 +47,8 @@ jQuery.extend({
// Exclude the following css properties to add px
cssNumber: {
+ "columns": true,
+ "columnCount": true,
"fillOpacity": true,
"fontWeight": true,
"lineHeight": true,
View
8 src/effects.js
@@ -620,12 +620,10 @@ jQuery.extend( jQuery.fx, {
},
step: {
- opacity: function( fx ) {
- jQuery.style( fx.elem, "opacity", fx.now );
- },
-
_default: function( fx ) {
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+ if (jQuery.cssHooks[ fx.prop ]) {
+ jQuery.style( fx.elem, fx.prop, fx.now );
+ } else if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
fx.elem.style[ fx.prop ] = fx.now + fx.unit;
} else {
fx.elem[ fx.prop ] = fx.now;

0 comments on commit 5047770

Please sign in to comment.