JQuery .fadeOut(); .fadeIn(); spam bug?

You should use the stop function in jQuery to cease any previously-running animations.

You should use the stop function in jQuery to cease any previously-running animations: $('. BoxHolder1'). Hover( function() { $('img.

Top1').stop(). FadeOut(400); }, function() { $('img. Top1').stop().

FadeIn(400); }); $('. BoxHolder2'). Hover( function() { $('img.

Top2').stop(). FadeOut(400); }, function() { $('img. Top2').stop().

FadeIn(400); }); $('. BoxHolder3'). Hover( function() { $('img.

Top3').stop(). FadeOut(400); }, function() { $('img. Top3').stop().

FadeIn(400); }).

You should provide true for both parameters to .stop(), for the desired effect. – Tomalak Geret'kal Aug 4 at 9:46.

Yes, event handler calls are queued. That is certainly not a bug. In your callback, you can use stop() to stop any currently-running animation.Be sure to pass true as the first argument to cancel queued ones too, and true as the second argument to stop the currently-running animation immediately whilst leaving it with its target properties.

$('. BoxHolder3'). Hover(function() { $('img.

Top3'). Stop(true, true). FadeOut(400); }, function() { $('img.

Top3'). Stop(true, true). FadeIn(400); }); You won't get this any more "efficient", though you might be able to reduce code duplication with the cunning use of variables.

You can stop the animation before any FADEIN/FADEOUT. Ex. $('img.

Top1'). Stop(true,true). FadeOut(400); It will clear the queue and finish the animation immediately.

Change both parameters of stop() function to fit your needs.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions