From 412d1aa1c9ac0a8a933710fef6d233a061fb9d13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 9 Nov 2010 08:38:06 -0500 Subject: [PATCH] Slide effect: Handle string values for distance. Fixes #6637 - Slide effect is jumpy with certain parameter combinations. Thanks Jeff Roush. --- ui/jquery.effects.slide.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.effects.slide.js b/ui/jquery.effects.slide.js index 5ada8a09a..56d8452e1 100644 --- a/ui/jquery.effects.slide.js +++ b/ui/jquery.effects.slide.js @@ -29,7 +29,7 @@ $.effects.slide = function(o) { 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})); - if (mode == 'show') el.css(ref, motion == 'pos' ? -distance : distance); // Shift + if (mode == 'show') el.css(ref, motion == 'pos' ? (isNaN(distance) ? "-" + distance : -distance) : distance); // Shift // Animation var animation = {}; -- 2.39.5