Reputation: 1791
I have the following animation:
jQuery("#fp-small-feature-1").mouseenter(function(){
jQuery(".bar").animate({width: "264px"},500);
});
jQuery("#fp-small-feature-1").mouseleave(function(){
jQuery(".bar").animate({width: "0px"},800);
});
How do I stop the animation from queuing up the effect if you mouse off and over a number of times in quick succession.
Upvotes: 1
Views: 205
Reputation: 2678
jQuery(document).ready(function(){
jQuery("#fp-small-feature-1").mouseenter(function(){
jQuery(".bar").stop().animate({width: "264px"},500);
});
jQuery("#fp-small-feature-1").mouseleave(function(){
jQuery(".bar").stop().animate({width: "0px"},800);
});
});
Upvotes: 6