diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-01-11 20:00:04 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-01-11 20:00:04 +0100 |
commit | 021243bc9b8aa81a3461564ce17ca3fc360fb948 (patch) | |
tree | f274814ddb7c6930cf5d1f331bbacc4772feac37 /ui/jquery.effects.blind.js | |
parent | bd7bd936d1e437ee1154ab6b7b1cdc70b1018363 (diff) | |
parent | 370bc00150f1f77275a861a3c15138b488061871 (diff) | |
download | jquery-ui-021243bc9b8aa81a3461564ce17ca3fc360fb948.tar.gz jquery-ui-021243bc9b8aa81a3461564ce17ca3fc360fb948.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'ui/jquery.effects.blind.js')
-rw-r--r-- | ui/jquery.effects.blind.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/jquery.effects.blind.js b/ui/jquery.effects.blind.js index 5f86bed7b..0380b262a 100644 --- a/ui/jquery.effects.blind.js +++ b/ui/jquery.effects.blind.js @@ -27,7 +27,7 @@ $.effects.effect.blind = function( o, done ) { motion = rpositivemotion.test( direction ), animation = {}, show = mode === "show", - wrapper, distance; + wrapper, distance, margin; // if already wrapped, the wrapper's properties are my property. #6245 if ( el.parent().is( ".ui-effects-wrapper" ) ) { @@ -41,21 +41,23 @@ $.effects.effect.blind = function( o, done ) { }); distance = wrapper[ ref ](); + margin = parseFloat( wrapper.css( ref2 ) ); animation[ ref ] = show ? distance : 0; if ( !motion ) { el .css( vertical ? "bottom" : "right", 0 ) - .css( vertical ? "top" : "left", "" ) + .css( vertical ? "top" : "left", "auto" ) .css({ position: "absolute" }); - animation[ ref2 ] = show ? 0 : distance; + + animation[ ref2 ] = show ? margin : distance + margin; } // start at 0 if we are showing if ( show ) { wrapper.css( ref, 0 ); if ( ! motion ) { - wrapper.css( ref2, distance ); + wrapper.css( ref2, margin + distance ); } } |