Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ui/jquery.effects.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,12 @@ $.extend( $.effects, {
}

// wrap the element
var props = {
width: element.outerWidth(true),
var floating = element.css( "float" ),
props = {
// for margin #px auto;(horizontal center)
width: floating === "none" ? "100%" : element.outerWidth(true),
height: element.outerHeight(true),
"float": element.css( "float" )
"float": floating
},
wrapper = $( "<div></div>" )
.addClass( "ui-effects-wrapper" )
Expand Down
9 changes: 5 additions & 4 deletions ui/jquery.effects.slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ $.effects.effect.slide = function( o ) {
ref = (direction == 'up' || direction == 'down') ? 'top' : 'left',
motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg',
distance,
animation = {};
animation = {}, wrapper;

// Adjust
$.effects.save( el, props );
el.show();
$.effects.createWrapper( el ).css({
wrapper = $.effects.createWrapper( el ).css({
overflow: 'hidden'
});

distance = o.distance || el[ ref == 'top' ? "outerHeight" : "outerWidth" ]({

// use the wrapper size, since it differs according to the block margin
distance = o.distance || wrapper[ ref == 'top' ? "outerHeight" : "outerWidth" ]({
margin: true
});
if (mode == 'show') {
Expand Down