Skip to content
Permalink
Browse files

Slide effect: Handle string values for distance. Fixes #6637 - Slide …

…effect is jumpy with certain parameter combinations.

Thanks Jeff Roush.
  • Loading branch information
scottgonzalez committed Nov 9, 2010
1 parent 4226fae commit 412d1aa1c9ac0a8a933710fef6d233a061fb9d13
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 = {};

0 comments on commit 412d1aa

Please sign in to comment.
You can’t perform that action at this time.