]> source.dussan.org Git - jquery.git/commitdiff
Effects: Fix inline element animations
authorRichard Gibson <richard.gibson@gmail.com>
Mon, 24 Mar 2014 16:36:15 +0000 (12:36 -0400)
committerRichard Gibson <richard.gibson@gmail.com>
Mon, 24 Mar 2014 16:36:15 +0000 (12:36 -0400)
Ref 80cf965e02e71dc1b11bf8c1b3d216b9ab4e99ac
Ref #14848

src/effects.js

index f6b6dbd770e548fc74d9757dc9efe2c97242173d..223c8e549315c9eb6a7a74c2585a2e18f293f37f 100644 (file)
@@ -116,7 +116,7 @@ function createTween( value, prop, animation ) {
 
 function defaultPrefilter( elem, props, opts ) {
        /* jshint validthis: true */
-       var prop, value, toggle, tween, hooks, oldfire, display, dDisplay,
+       var prop, value, toggle, tween, hooks, oldfire, display,
                anim = this,
                orig = {},
                style = elem.style,
@@ -166,7 +166,7 @@ function defaultPrefilter( elem, props, opts ) {
 
                        // inline-level elements accept inline-block;
                        // block-level elements need to be inline with layout
-                       if ( !support.inlineBlockNeedsLayout || dDisplay === "inline" ) {
+                       if ( !support.inlineBlockNeedsLayout || defaultDisplay( elem.nodeName ) === "inline" ) {
                                style.display = "inline-block";
                        } else {
                                style.zoom = 1;