Skip to content

Commit

Permalink
Slide effect: Handle string values for distance. Fixes #6637 - Slide …
Browse files Browse the repository at this point in the history
…effect is jumpy with certain parameter combinations.

Thanks Jeff Roush.
  • Loading branch information
scottgonzalez committed Nov 9, 2010
1 parent 4226fae commit 412d1aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.effects.slide.js
Expand Up @@ -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 = {};
Expand Down

0 comments on commit 412d1aa

Please sign in to comment.