保持TwitterBootstrap工具提示在mouseleave上保持打开状态 [英] Keep Twitter Bootstrap Tooltip open on mouseleave

查看:99
本文介绍了保持TwitterBootstrap工具提示在mouseleave上保持打开状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于特定情况和元素,我需要默认显示Bootstrap Tooltip(一旦加载页面),并且始终保持打开状态(即使在鼠标悬停和mouseout时).

For a particular case and element I need to show Bootstrap Tooltip by default (once the page is loaded) an always keep it open (even on mouseover and mouseout).

默认情况下,这是我用来打开工具提示的代码:

That's the code I use to open tooltip by default on the element:

$('#myelement').tooltip('show');

现在,我不确定如何防止/禁用鼠标悬停&上的工具提示的默认操作.鼠标移出. 有什么主意吗?

Now I'm not sure how to prevent/disable the default action of tooltip on mouseover & mouseout. Any idea?

提前谢谢!

推荐答案

找到解决方案.手动触发器可以解决问题-这是更新的代码:

Solution found. Manual Trigger does the trick - here is the updated code:

$('.taskTooltip').tooltip({trigger: 'manual'}).tooltip('show');

这篇关于保持TwitterBootstrap工具提示在mouseleave上保持打开状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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