为了账号安全,请及时绑定邮箱和手机立即绑定

JQ中关于hover()的问题!

JQ中关于hover()的问题!

鸡肋2016 2016-09-24 11:39:38
$(function(){     var $tip = $('.tip') //数组$tip.each(function(index,value){    $tip.eq(index).hover(function(){          $(this).animate({left:'10px'},'fast');},function(){         $(this).animate({left:'0px'},'fast');       });  });})这样有一个问题,快速多次滑进滑出后 鼠标不动,它还会动一会;所以给它加一个if(!$tip.is(':animated')){};     var $tip = $('.tip') //数组$tip.each(function(index,value){    $tip.eq(index).hover(     if(!$tip.is(':animated')){function(){          $(this).animate({left:'10px'},'fast');},function(){         $(this).animate({left:'0px'},'fast');       }     });  });})但这样的写法是错的  请指教怎么办!!??
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 1529 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信