r2919 - animateClass: Don't animate scrollbar properties. Fixes #4676 - toggleClass breaks in IE...

r2919 - animateClass: Don't animate scrollbar properties. Fixes #4676 - toggleClass breaks in IE...


Author: scott.gonzalez
Date: Sun Jul 12 17:51:03 2009
New Revision: 2919
Modified:
trunk/ui/effects.core.js
Log:
animateClass: Don't animate scrollbar properties. Fixes #4676 -
toggleClass breaks in IE sometimes.
Modified: trunk/ui/effects.core.js
==============================================================================
--- trunk/ui/effects.core.js    (original)
+++ trunk/ui/effects.core.js    Sun Jul 12 17:51:03 2009
@@ -113,6 +113,7 @@
            for(var n in newStyle) {
                if( typeof newStyle[n] != "function" && newStyle[n] /* No functions
and null properties */
                && n.indexOf("Moz") == -1 && n.indexOf("length") == -1 /* No mozilla
spezific render properties. */
+                && n.indexOf("scrollbar") == -1 /* No scrollbar properties - causes
problems in IE */
                && newStyle[n] != oldStyle[n] /* Only values that have changed are
used for the animation */
                && (n.match(/color/i) || (!n.match(/color/i)
&& !isNaN(parseInt(newStyle[n],10)))) /* Only things that can be parsed to
integers or colors */
                && (oldStyle.position != "static" || (oldStyle.position == "static"
&& !n.match(/left|top|bottom|right/))) /* No need for positions when
dealing with static positions */
@@ -133,6 +134,12 @@
function _normalizeArguments(effect, options, speed, callback) {
    // shift params for method overloading
+    if (typeof effect == 'object') {
+        callback = options;
+        speed = null;
+        options = effect;
+        effect = options.effect;
+    }
    if ($.isFunction(options)) {
        callback = options;
        speed = null;