首页 > Web开发 > 详细

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

时间:2016-01-30 13:47:42      阅读:296      评论:0      收藏:0      [点我收藏+]
    // 热门推荐悬浮效果
    $("#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

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

原文:http://www.cnblogs.com/wesky/p/5170693.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!