在jquery clueTip中是否有任何方法让escape键关闭一个粘性的工具提示? [英] Is there any way in jquery clueTip to have the escape key close a sticky tooltip?

查看:64
本文介绍了在jquery clueTip中是否有任何方法让escape键关闭一个粘性的工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jquery cluetip,效果很好。我有它在粘性模式,所以我可以将鼠标悬停在工具提示上并点击链接等。

i am using jquery cluetip and it works great. I have it in sticky mode so i can hover over the tooltip and click on links, etc.

我有一个差距是它有点烦人的鼠标点击右边的uppoeer关闭cluetip。无论如何只需按下退出键并关闭cluetip?我希望这种行为是开箱即用的,但我没有看到它。

The one gap i have is that its a bit annoying to have to mouse click on the uppoeer right to close the cluetip . Is there anyway to simply hit the escape key and have the close the cluetip? I would expect that behavior to come out of the box but i dont see it.

推荐答案

你可以尝试这样的事情。

You can try something like this.

$(document).keydown(function(e) {
    // ESCAPE key pressed
    if (e.keyCode == 27) {
        //Code here to close the tooltip
        $(document).trigger('hideCluetip');
    }
});

这篇关于在jquery clueTip中是否有任何方法让escape键关闭一个粘性的工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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