Stop jQuery animation loop

I have the following animation:

http://jsfiddle.net/jtqcj/2/

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 to stop the animation in the queue if you quickly exit and several times in a row.

+1
source share
1 answer
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);
}); 

});​
+6
source

All Articles