我有一些如下所示的链接,这是一个jsfiddle 链接。
我想要的是 ?
我希望仅当鼠标悬停超过 3 秒时才触发 jquery 方法。我知道我必须使用setTimeout
,但我无法理解如何使用它。
如果有人可以通过编辑我的小提琴链接来帮助我
代码
<ul>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin (actor)', this)" onclick="Suggestion('Sachin (actor)');" class="link">Sachin (actor)</a>
</li>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin Dev Burman', this)" onclick="Suggestion('Sachin Dev Burman');" class="link">Sachin Dev Burman</a>
</li>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin Pilot', this)" onclick="Suggestion('Sachin Pilot');" class="link">Sachin Pilot</a>
</li>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin Rana', this)" onclick="Suggestion('Sachin Rana');" class="link">Sachin Rana</a>
</li>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin Tendulkar', this)" onclick="Suggestion('Sachin Tendulkar');" class="link">Sachin Tendulkar</a>
</li>
<li>
<a onmouseout="RemoveDetails(this)" onmouseover="GetSomeDetail('Sachin, Pas-de-Calais', this)" onclick="Suggestion('Sachin, Pas-de-Calais');" class="link">Sachin, Pas-de-Calais</a>
</li>
</ul>
<hr/>
<p style="color:red;" id="moreInfo"></p>
查询代码
function GetSomeDetail(input, currentContext) {
$("#moreInfo").text(input);
}
function RemoveDetails(currentContext) {
$("#moreInfo").text('Unloaded !');
}
请帮我解决这个问题