I’m new to JQuery and basically I know enough to get into trouble but not to get out of it. Here I know that stop() should stop an item from queing an animation, but maybe I have it in the wrong place. Not sure.
$('.image').hover(
function(){ $(this).stop().find('.up').fadeOut().end().find('.over').fadeIn();},
function(){ $(this).stop().find('.over').fadeOut().end().find('.up').fadeIn();}
);
The code involves a simple image swap. In the HTML there are two images and in the CSS, one image is set to display:none. This bit of JQuery fades in the hidden image on a hover event. The problem is that even with the stop command, if the user runs their mouse over it a number of times, the animation will keep queing up over and over again, making the effect look broken.
I also tried {queue: false} and that didn’t seem to work either. If anybody has any ideas about why this isn’t working, I’d love to hear them.