<!doctype html><html><head><meta charset="UTF-8"><title>Document</title><style type="text/css"> p{ width:150px; height:150px; float:left; border:1px solid #ddd; }</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"){ //鼠標(biāo)進(jìn)入 $(this).text("wow"); }else if(e.type == "mouseleave"){ //鼠標(biāo)離開(kāi) $(this).text("amaze"); } });</script>
jquery如何給鼠標(biāo)進(jìn)入事件設(shè)置三秒后執(zhí)行里面的函數(shù),謝謝
莫回?zé)o
2018-09-11 13:13:41