我有这个实现,允许用户将鼠标悬停在具有icon-ban-circle
类的元素上,然后看到带有链接的Bootstrap popover:
## some_file.html.haml
%i.icon-ban-circle{:rel => 'popover', "data-content" => "<a href="http://www.google.com">Click here</a>".html_safe}
## some_file.js
var showError;
showError = $(".icon-ban-circle").popover({
html: true,
trigger: 'hover'
});
但是一旦用户将光标移动到弹出窗口,它就会消失。如何在icon-ban-circle
类中包含popover,以便在用户尝试单击popover中的链接时保持打开状态?
答案 0 :(得分:0)
使用delay
延迟显示和隐藏弹出窗口(ms) - 不适用于手动 触发类型
如果提供了数字,延迟将同时应用于hide / show
对象结构是:延迟:{show:500,hide:100}