【发布时间】:2013-03-25 07:25:00
【问题描述】:
我无法让我的引导弹出框在我的 rails 应用程序中正常工作。我尝试了其他问题的解决方案,但没有成功。
目前在我的 HTML 中我有:
<i class="icon-exclamation-sign" id="info" rel="popover" data-content="some info"></i>
和
<script>
$(function () {
$(".icon-exclamation-sign").popover();
});
</script>
我的 application.js 看起来像:
//= require jquery
//= require jquery_ujs
//= require bootstrap-datepicker
//= require_tree .
//= require bootstrap-tooltip
//= require bootstrap-popover
我的 application.css 看起来像:
/*
*= require_tree .
*= require bootstrap-datepicker
*/
我收到错误:加载页面时未捕获的 TypeError: Object [object Object] has no method 'popover'。我做错了什么?
编辑:我也试过在我的 application.js 中使用 require bootstrap 而不是 tooltip 和 popover,但没有运气。
【问题讨论】:
-
脚本是在DOM完全加载后运行的吗?
-
我刚刚尝试准备好文档,但没有成功。
标签: ruby-on-rails twitter-bootstrap popover twitter-bootstrap-rails