Stop Current Animations in jQuery
I seem to encounter this a lot with sliders, faders and other UI/UX elements. Quick fix and works well. Stumbled on this code and thought it would be useful in the future...
$('#element').bind('mouseover',function(){
$(this).stop(true,false).animate({
width: 200
},500);
}).bind('mouseout',function(){
$(this).stop(true,false).animate({
width: 50
},500);
});Responses to this Article:
Loading Comments...
I am a web developer, designer, and consultant located in the La Crosse / Onalaska Wisconsin region with
over twelve years experience developing and managing projects ranging from large applications and cloud-based
business solutions to social/new media campaigns, to complete system and infrastructure implementation.