Skip to content

Commit 48659c6

Browse files
rozwellgnarf
authored andcommitted
Effects: Blind effect bugfix - Pull Request jquery#563 - No Ticket
1 parent 85348ee commit 48659c6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ui/jquery.effects.blind.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $.effects.effect.blind = function( o, done ) {
2727
motion = rpositivemotion.test( direction ),
2828
animation = {},
2929
show = mode === "show",
30-
wrapper, distance;
30+
wrapper, distance, margin;
3131

3232
// if already wrapped, the wrapper's properties are my property. #6245
3333
if ( el.parent().is( ".ui-effects-wrapper" ) ) {
@@ -41,21 +41,23 @@ $.effects.effect.blind = function( o, done ) {
4141
});
4242

4343
distance = wrapper[ ref ]();
44+
margin = parseInt(wrapper.css(ref2));
4445

4546
animation[ ref ] = show ? distance : 0;
4647
if ( !motion ) {
4748
el
4849
.css( vertical ? "bottom" : "right", 0 )
49-
.css( vertical ? "top" : "left", "" )
50+
.css( vertical ? "top" : "left", "auto" )
5051
.css({ position: "absolute" });
51-
animation[ ref2 ] = show ? 0 : distance;
52+
53+
animation[ ref2 ] = show ? margin : distance + margin;
5254
}
5355

5456
// start at 0 if we are showing
5557
if ( show ) {
5658
wrapper.css( ref, 0 );
5759
if ( ! motion ) {
58-
wrapper.css( ref2, distance );
60+
wrapper.css( ref2, margin + distance );
5961
}
6062
}
6163

0 commit comments

Comments
 (0)