Let's take this script:
$('a').hover(function() {
$('div').stop(c,j).fadeIn();
}, function() {
$('div').stop(c,j).fadeOut();
});
With c=0,j=0
, if I over a
several times, my div fade in and out and in and… yerk.
With c=1,j=1
, it almost does what I want, but we got this blinking effect due to the jumpToEnd
parameter, and it looks buggy.
So finally, what I want is c=0,j=1
, BUT if I over in, and quickly over out and back in, animation is stopped, the next fade function won't launch and my div is half transparent. Why ?
I meet this issue often enough, and wonder why I can't find anything on it. (Last I can remember is a comment on jQuery stop()
page, but comments are now removed.)