HoverIntent ClearTimeout [英] HoverIntent ClearTimeout

查看:122
本文介绍了HoverIntent ClearTimeout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何清除 hoverIntent内置的超时 ?我想在同一hoverIntent的 over 部分中完成此操作.

How do I clear the timeout built-in to hoverIntent? I'd like to do it from within the over section of the same hoverIntent.

推荐答案

在进一步研究中,我发现超时被存储为hoverIntent所应用的HTML元素的属性.因此,为了清除超时,请执行以下操作.

Upon further research, I found that the timeout is stored as an attribute of the HTML element hoverIntent was applied to. So in order to clear the timeout do the following.

clearTimeout($(this).attr("hoverIntent_t"));

但是请记住,每个元素都将附加自己的超时.因此,要一起停止hoverIntent,您需要执行以下操作:

Keep in mind however, that each element will have it's own timeout attached to it. So to stop hoverIntent all together, you'll want to do the following:

$(this).siblings().each(function () {
    clearTimeout($(this).parent().children().attr("hoverIntent_t"));
});

这篇关于HoverIntent ClearTimeout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆