Effects: Fixing call to outerHeight/Width in slide effect for compat with 1.8 core

backport of ed64ccf
This commit is contained in:
Corey Frang 2012-07-20 18:51:40 -05:00
parent d8f45623b8
commit 037a509dba

View File

@ -28,7 +28,7 @@ $.effects.slide = function(o) {
$.effects.createWrapper(el).css({overflow:'hidden'}); // Create Wrapper
var ref = (direction == 'up' || direction == 'down') ? 'top' : 'left';
var motion = (direction == 'up' || direction == 'left') ? 'pos' : 'neg';
var distance = o.options.distance || (ref == 'top' ? el.outerHeight({margin:true}) : el.outerWidth({margin:true}));
var distance = o.options.distance || (ref == 'top' ? el.outerHeight( true ) : el.outerWidth( true ));
if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift
// Animation