【发布时间】:2012-11-28 15:45:07
【问题描述】:
我正在尝试使用twitter bootstrap example 中的弹出框,所以当你点击一个按钮时它会出现,当你点击它时它会消失。
我在 application.js 中
//= require bootstrap-tooltip.js
//= require bootstrap-popover.js
$(function () {
$('.popover-test').popover();
});
在我看来 _fof.html.erb
<button class="popover-test" id="button1" data-content="Popover Content">
<%= 'ciao' %>
</button>
但弹出框仅在鼠标悬停时出现,当我继续移动时它会消失。 是不是要在js中实现on_click函数?
【问题讨论】:
-
你能提供一个 JSFiddle...吗?
标签: ruby-on-rails twitter-bootstrap click popover