保持TwitterBootstrap工具提示在mouseleave上保持打开状态

保持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');