diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-11-09 08:38:06 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-11-09 08:38:06 -0500 |
commit | 412d1aa1c9ac0a8a933710fef6d233a061fb9d13 (patch) | |
tree | 1940217ec59f25453d6e471a6c1f1e8bb99375a2 /ui/jquery.effects.slide.js | |
parent | 4226faed099391997021ac85db0735e80aaf5e33 (diff) | |
download | jquery-ui-412d1aa1c9ac0a8a933710fef6d233a061fb9d13.tar.gz jquery-ui-412d1aa1c9ac0a8a933710fef6d233a061fb9d13.zip |
Slide effect: Handle string values for distance. Fixes #6637 - Slide effect is jumpy with certain parameter combinations.
Thanks Jeff Roush.
Diffstat (limited to 'ui/jquery.effects.slide.js')
-rw-r--r-- | ui/jquery.effects.slide.js | 2 |
1 files changed, 1 insertions, 1 deletions
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 = {}; |