Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#6637 closed bug (fixed)

Slide effect is jumpy with certain parameter combinations

Reported by: Jeff Roush Owned by:
Priority: minor Milestone: 1.8.7
Component: ui.effects.* (individual effect) Version: 1.8.6
Keywords: Cc:
Blocked by: Blocking:


An example of the bug is at:

When showing an element using the slide effect, if the direction parameter is 'left' or 'up', and the distance parameter is a non-number CSS position, like "75%", or "75px", instead of a pure number, the animation runs but starts at the wrong location and jumps when it's done. When the direction is 'right' or 'down', or the distance is a pure number, the animation is smooth.

The animation should be smooth for all valid parameter combinations.

To reproduce:

First, run the slide effect to the left, with a distance parameter that is not a simple number:

jqobj.effect('slide', {direction: 'left', mode: 'hide', distance: '75%'}, 2000);

And once the hiding is finished, call

jqobj.effect('slide', {direction: 'left', mode: 'show', distance: '75%'}, 2000);

I have a fix: Changing line 32 of jquery.effects.slide.js from

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

adds an isNaN check for distance. With this change, the animation runs smoothly.

Change History (2)

comment:1 Changed 12 years ago by Scott González

Milestone: TBD1.9
Resolution: fixed
Status: newclosed

Fixed in 412d1aa.

comment:2 Changed 12 years ago by Scott González

Note: See TracTickets for help on using tickets.