.stop() overrides height/width of element
|Reported by:||apfelbox||Owned by:||apfelbox|
I have this code example: http://jsfiddle.net/2AcL9/1/
There are 2 boxes, which I want to slideUp() and slideDown().
If you now hit the buttons very fast (and often) and stop afterwards, there are several issues:
Without .stop(): The animation is queued and the box slides up and down without doing anything for several times
With .stop(): The animation stops and slides in the opposite direction (which is the desired behaviour). Unfortunately, if sliding down and hitting the button again, the current height becomes the new total height of the element. This means, that the element will only slide to this point from now on.
With .stop(true, true): The problem of .stop() does not occur anymore, but due to the jump to the end of the animation queue, the elements "pops down" or up which does not look very good.
Maybe there is another way to get my desired behaviour (.stop() without the resetting of the height), and I haven't found it yet. I would be glad, if somebody could point me in the right direction. If there is no other way, I would consider this a bug.
- Version is "edge" of jsFiddle.
- Browser: Firefox 6.0.2 (all add-ons are disabled)
- OS: OS X 10.7.1
- Step-By-Step instructions: see above.
- description: see above.
Older versions: this is quite an old issue, so I would guess, that there are a lot of versions, where this behaviour occurs.
Change History (11)
comment:4 Changed 6 years ago by rwaldron
- Component changed from unfiled to effects
- Priority changed from undecided to low
comment:6 Changed 5 years ago by dmethvin
- Resolution set to duplicate
- Status changed from new to closed