【发布时间】:2013-11-23 01:05:54
【问题描述】:
我有这个实现,它使用户能够将鼠标悬停在具有 icon-ban-circle 类的元素上,然后看到带有链接的 Bootstrap 弹出窗口:
## 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 类中,以便在用户尝试单击弹出框中的链接时保持打开状态?
【问题讨论】:
标签: javascript twitter-bootstrap popover