jquery 停止animate动画,并且回复最初状态

    // 热门推荐悬浮效果
    $("#recom_con li img").mouseenter(function(){
        $(this).stop(true, true);
        $w = parseInt($(this).width())+10;
        $(this).animate({'width':$w},300);
    });
    $("#recom_con li img").mouseleave(function(){
        $(this).stop(true, true);
        $w = parseInt($(this).width())-10;
        $(this).animate({'width':$w},300);
    });

http://www.w3school.com.cn/jquery/effect_stop.asp

原文地址:https://www.cnblogs.com/wesky/p/5170693.html