Twitter bootstrap Twitter引导弹出窗口不工作

Twitter bootstrap Twitter引导弹出窗口不工作,twitter-bootstrap,popover,Twitter Bootstrap,Popover,这是我的HTML: <div id="disclaimer">After 30 Days you'll have the option to keep your account for $15 per month -no contract required-or revert to a single page free account.*</div> 当我将鼠标悬停在元素上时,什么都不会发生。。没有JavaScript错误或其他任何错误,也不确定是什么错误,使用您的精确

这是我的HTML:

<div id="disclaimer">After 30 Days you'll have the option to keep your account for $15 per month -no contract required-or revert to a single page free account.*</div>

当我将鼠标悬停在元素上时,什么都不会发生。。没有JavaScript错误或其他任何错误,也不确定是什么错误,使用您的精确代码,我所要做的就是将其包装在函数调用中,并将脚本放在div标记下面。如果将jQuery放在onload函数中,它也可以正常工作。祝你好运

使用以下命令:

<div id="disclaimer" >After 30 Days you'll have the option to keep your account for $15 per month -no contract required-or revert to a single page free account.*</div>

<script>
$(function ()  
{
  $('#disclaimer').popover(
  {
     trigger: 'hover',
     html: true,
     placement: 'right',
     content: 'hello world'
  });
});
</script>

我已经找了一天多的时间,想知道为什么我的popover在由于我的页面上发生的事件而被自动禁用后不能工作(一个复杂的应用程序,根据正在发生的事情的状态启用/禁用)关键不是让它准备好文档,而是让它在一个函数中输出,因为它是在文档初始化后通过单击按钮启用的

我把我的包在一个
$(文档)中。准备好了
,但仍然没有发生任何事情:(你能把它放到脚本标签中的html中吗?如果仍然不起作用,你可能想检查一下,确保你的脚本中包含了工具提示,我发现了…是ActiveAdmin JavaScript与twitter引导冲突…谢谢你的帮助!答案在这条评论中:我同意,active admin导致了冲突。我通过将active admin移动到
vendor/javascripts
目录解决了这个问题,it workedIt似乎无法克隆popover,这是我的问题。谢谢,这个提示让我尝试了另一种方法。如果我在克隆后应用popover,它会工作。
<div id="disclaimer" >After 30 Days you'll have the option to keep your account for $15 per month -no contract required-or revert to a single page free account.*</div>

<script>
$(function ()  
{
  $('#disclaimer').popover(
  {
     trigger: 'hover',
     html: true,
     placement: 'right',
     content: 'hello world'
  });
});
</script>
$(document).ready(function()
{
  $('#disclaimer').popover(
  {
     trigger: 'hover',
     html: true,
     placement: 'right',
     content: 'hello world'
  });
});