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

用jQuery实现时出错,请大神帮看看

var $li = $('li');
$li.on('mouseover', function () {
   mutipleMove($(this), 400)
})
$li.on('mouseout', function () {
   mutipleMove($(this), 200)
})
function mutipleMove(obj, target) {
   clearInterval(obj.timer);
   var speed = 0;
   if (obj.width() > target) {
      speed = -10;
   }
   else {
      speed = 10;
   }
   obj.timer = setInterval(function () {
      if (obj.width() == target) {
         clearInterval(obj.timer)
      }
      else {
         obj.css({
            'width': '+=' + speed + ''
         })
      }
   }, 30)
}

哪里错了??


正在回答

1 回答

举报

0/150
提交
取消

用jQuery实现时出错,请大神帮看看

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信