Bug Tracker

Opened 10 years ago

Closed 9 years ago

#6772 closed bug (fixed)

$.slideToggle() & $.hover() animation issues

Reported by: AP Erebus Owned by:
Priority: high Milestone: 1.next
Component: effects Version: 1.4.2
Keywords: slideToggle, hover Cc:
Blocked by: Blocking:


This is an issue I raised on StackOverflow at: http://stackoverflow.com/questions/3177446/slidetoggle-hover-animation-queue-issue

Basically is that when trying to use slideToggle() with hover() you get the animation queuing. I attempted to remedy this with stop() but this then caused the animation to stop working. The SO post contains a lot more info.

This JSFiddle: http://jsfiddle.net/SNhky/ contains the code that doesn't work.

I'm using Chrome 6.0.453.1 dev, but this error occurs in IE8 as well.

Change History (4)

comment:1 Changed 10 years ago by addyosmani

need: ReviewPatch
Priority: undecided

I've tested this in Chrome 6.0.472.62 and the behavior is as follows:

Hovering over the item, the animation works fine for the first few attempts but on subsequent hovers it begins to fail to the point where what is slid down is a fraction of the correct height/size. May be a bubbling issue.

Having run the test a few times, it would appear that this behavior is semi-consistent.

Flagging for patch.

comment:2 Changed 10 years ago by snover

Priority: undecidedhigh
Status: newopen

comment:3 Changed 10 years ago by anonymous

I think this bug occurs where the previous animation is not 100% complete the system believes the original height is a fraction of what it actually is. Only fixes I have found so far are to 1) make sure your animations are very short, so it is more likely the animations complete; 2) make your fadeOut / callback function instant - use hide() instead of slideUp for example

comment:4 Changed 9 years ago by timmywil

Milestone: 1.next
Resolution: fixed
Status: openclosed

Again, stop(true, true) fixes this issue, but see #8685.

Note: See TracTickets for help on using tickets.