* Applied patch for #204
[jquery.git] / src / fx / fx.js
index 1dfd31e..4ad2b55 100644 (file)
@@ -447,16 +447,10 @@ jQuery.extend({
                z.a = function(){\r
                        if ( options.step )\r
                                options.step.apply( elem, [ z.now ] );\r
-\r
-                       if ( prop == "opacity" ) {\r
-                               if (jQuery.browser.mozilla && z.now == 1) z.now = 0.9999;\r
-                               if (window.ActiveXObject)\r
-                                       y.filter = "alpha(opacity=" + z.now*100 + ")";\r
-                               else\r
-                                       y.opacity = z.now;\r
-\r
-                       // My hate for IE will never die\r
-                       } else if ( parseInt(z.now) )\r
\r
+                       if ( prop == "opacity" )\r
+                               jQuery.attr(y, "opacity", z.now); // Let attr handle opacity\r
+                       else if ( parseInt(z.now) ) // My hate for IE will never die\r
                                y[prop] = parseInt(z.now) + "px";\r
                                \r
                        y.display = "block";\r
@@ -490,8 +484,12 @@ jQuery.extend({
 \r
                        // Remember where we started, so that we can go back to it later\r
                        z.el.orig[prop] = this.cur();\r
-\r
-                       z.custom( 0, z.el.orig[prop] );\r
+                       \r
+                       // Begin the animation\r
+                       if (prop == "opacity")\r
+                               z.custom(z.el.orig[prop], 1);\r
+                       else\r
+                               z.custom(0, z.el.orig[prop]);\r
 \r
                        // Stupid IE, look what you made me do\r
                        if ( prop != "opacity" )\r
@@ -511,10 +509,6 @@ jQuery.extend({
                        z.custom(z.el.orig[prop], 0);\r
                };\r
        \r
-               // IE has trouble with opacity if it does not have layout\r
-               if ( jQuery.browser.msie && !z.el.currentStyle.hasLayout )\r
-                       y.zoom = "1";\r
-       \r
                // Remember  the overflow of the element\r
                if ( !z.el.oldOverlay )\r
                        z.el.oldOverflow = jQuery.css( z.el, "overflow" );\r
@@ -552,7 +546,10 @@ jQuery.extend({
                                        // Reset the property, if the item has been hidden\r
                                        if ( z.o.hide ) {\r
                                                for ( var p in z.el.curAnim ) {\r
-                                                       y[ p ] = z.el.orig[p] + ( p == "opacity" ? "" : "px" );\r
+                                                       if (p == "opacity" && jQuery.browser.msie)\r
+                                                               jQuery.attr(y, p, z.el.orig[p]);\r
+                                                       else\r
+                                                               y[ p ] = z.el.orig[p] + "px";\r
        \r
                                                        // set its height and/or width to auto\r
                                                        if ( p == 'height' || p == 'width' )\r