]> source.dussan.org Git - jquery.git/commitdiff
Ref 3971c2eb: Sync with 1.x-master
authorRichard Gibson <richard.gibson@gmail.com>
Tue, 14 May 2013 00:37:42 +0000 (20:37 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Tue, 14 May 2013 00:37:42 +0000 (20:37 -0400)
src/effects.js
test/unit/effects.js

index bb10b73f8438ab572fd6f3d684a48164509b187e..78f36827aa4cb0f507e18080bb39b7ee68cad8f6 100644 (file)
@@ -249,7 +249,7 @@ jQuery.Animation = jQuery.extend( Animation, {
 
 function defaultPrefilter( elem, props, opts ) {
        /* jshint validthis: true */
-       var index, prop, value, toggle, tween, hooks, oldfire,
+       var prop, value, toggle, tween, hooks, oldfire,
                anim = this,
                orig = {},
                style = elem.style,
@@ -310,21 +310,21 @@ function defaultPrefilter( elem, props, opts ) {
 
 
        // show/hide pass
-       for ( index in props ) {
-               value = props[ index ];
+       for ( prop in props ) {
+               value = props[ prop ];
                if ( rfxtypes.exec( value ) ) {
-                       delete props[ index ];
+                       delete props[ prop ];
                        toggle = toggle || value === "toggle";
                        if ( value === ( hidden ? "hide" : "show" ) ) {
 
                                // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
-                               if ( value === "show" && dataShow && dataShow[ index ] !== undefined ) {
+                               if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
                                        hidden = true;
                                } else {
                                        continue;
                                }
                        }
-                       orig[ index ] = dataShow && dataShow[ index ] || jQuery.style( elem, index );
+                       orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
                }
        }
 
index 47bc9b4b62718f314adc68c51690ce42dc770c81..d59ff84a6dc369af28c5b1fbf0447e63e090828d 100644 (file)
@@ -1379,8 +1379,8 @@ test("line-height animates correctly (#13855)", function() {
                animated = jQuery(
                        "<p style='line-height: 4;'>unitless</p>" +
                        "<p style='line-height: 50px;'>px</p>" +
-                       "<p style='line-height: 120%;'>percent</p>" +
-                       "<p style='line-height: 1.5em;'>em</p>"
+                       "<p style='line-height: 420%;'>percent</p>" +
+                       "<p style='line-height: 2.5em;'>em</p>"
                ).appendTo("#qunit-fixture"),
                initialHeight = jQuery.map( animated, function( el ) {
                        return jQuery( el ).height();