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

Backport of commit 4e3d31e
This commit is contained in:
Corey Frang 2012-07-20 18:09:34 -05:00
parent d945d297f8
commit d8f45623b8

View File

@ -28,7 +28,7 @@ $.effects.drop = function(o) {
$.effects.createWrapper(el); // 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}) / 2 : el.outerWidth({margin:true}) / 2);
var distance = o.options.distance || (ref == 'top' ? el.outerHeight( true ) / 2 : el.outerWidth( true ) / 2);
if (mode == 'show') el.css('opacity', 0).css(ref, motion == 'pos' ? -distance : distance); // Shift
// Animation