jquery如何给鼠标进入事件设置三秒后执行里面的函数,谢谢?
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
p{ width:150px; height:150px; float:left; border:1px solid #ffffd; }
</style>
</head>
<body>
<div id="append"> <p>amaze</p> <p>amaze</p> <p>amaze</p> <p>amaze</p> </div> <script type="text/javascript" src="jquery-3.1.1.min.js"></script> <script type="text/javascript"> $("#append").on("mouseenter mouseleave","p",function(e){ if(e.type == "mouseenter"){ //鼠标进入 $(this).text(优艾设计网_设计"wow"); }else if(e.type == "mouseleave"){ //鼠标离开$(this).text("amaze"); } }); </script>
</body>
</html>
人在左岸谁来渡 7小时前 优艾设计网_设计圈
settimeout(functoin(){},3000)
精彩评论