亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問如何規范使用setTimeout?該怎么修改?

請問如何規范使用setTimeout?該怎么修改?

慕仙森 2022-11-20 18:09:42
$(document).ready(function(){$(".sly li").hover(function() {$(this).children(".sum").setTimeout(function(){jQuery(this).children(".sum").animate({"top": "160px"}, 500, "swing")},1000);},function() {$(this).children(".sum").setTimeout(function(){jQuery(this).children(".sum").animate({"top": "229px"}, 200, "swing")},1000);});});  </script>
查看完整描述

2 回答

?
繁星coding

TA貢獻1797條經驗 獲得超4個贊

Timeout是瀏覽器環境下自帶的函數,直接使用setTimeout(function(){},delay)或者,window.setTimeout(function(){},delay)即可,不是你這樣使用的

查看完整回答
反對 回復 2022-11-24
?
富國滬深

TA貢獻1790條經驗 獲得超9個贊

setTimeout(function(){},等待的毫秒數)

查看完整回答
反對 回復 2022-11-24
  • 2 回答
  • 0 關注
  • 170 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號