jQuery - Animation flicker using hover()
- by Chris
I have a setup as described in this question which works perfectly. Essentially a drop down menu grows when you move your mouse over it to expose more options.
There is, however, a small issue. If you move the mouse outside of the #dropdown div and then back in again quickly it constantly fires the mouseenter and mouseleave events causing a never ending cycle of flickering. How can I get around it?
Here is my current jQuery code
$("#dropdown").hover(function() {
$(this).stop(true,true).fadeTo('fast',1);
$("#options").stop(true,true).slideDown();
}, function() {
$(this).stop(true,true).fadeTo('fast',0.1);
$("#options").stop(true,true).slideUp();
}
);