diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-11-15 01:30:38 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-11-15 01:30:38 +0000 |
commit | 24ff73860111462b2955eddd80ba0cfc34ab469c (patch) | |
tree | fc5c00cf8945214fcde5cc4e60ed68772fcba8f8 /ui/jquery.effects.core.js | |
parent | 73191c2beabdf139a0361eb3c7b2f01ff5080e84 (diff) | |
download | jquery-ui-24ff73860111462b2955eddd80ba0cfc34ab469c.tar.gz jquery-ui-24ff73860111462b2955eddd80ba0cfc34ab469c.zip |
Class Animation: Don't animate shorthand styles.
Color Animation: Removed borderColor since we no longer animate shorthand styles.
Diffstat (limited to 'ui/jquery.effects.core.js')
-rw-r--r-- | ui/jquery.effects.core.js | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.effects.core.js b/ui/jquery.effects.core.js index 07d73ce49..ca8d73809 100644 --- a/ui/jquery.effects.core.js +++ b/ui/jquery.effects.core.js @@ -18,7 +18,7 @@ $.effects = {}; /******************************************************************************/ // override the animation for color styles -$.each(['backgroundColor', 'borderColor', 'borderBottomColor', 'borderLeftColor', +$.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'color', 'outlineColor'], function(i, attr) { $.fx.step[attr] = function(fx) { @@ -144,7 +144,18 @@ var colors = { /****************************** CLASS ANIMATIONS ******************************/ /******************************************************************************/ -var classAnimationActions = ['add', 'remove', 'toggle']; +var classAnimationActions = ['add', 'remove', 'toggle'], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; function getElementStyles() { var style = document.defaultView @@ -186,6 +197,8 @@ function filterStyles(styles) { value == null || // ignore functions (when does this occur?) $.isFunction(value) || + // shorthand styles that need to be expanded + name in shorthandStyles || // ignore Mozilla specific styles (Moz and length) // ignore scrollbars (break in IE) (/(Moz)|(length)|(scrollbar)/).test(name) || @@ -279,7 +292,7 @@ $.fn.extend({ switchClass: function(remove,add,speed,easing,callback) { return $.effects.animateClass.apply(this, [{ add: add, remove: remove },speed,easing,callback]); - }, + } }); |