简体   繁体   English

Twitter bootstrap .popover无效

[英]Twitter bootstrap .popover not working

I'm trying to get Twitter Bootstrap's .popover working and I've pretty much copied the code on my site, but it tells me Object [object object] has no method 'popover' on inspect element. 我正在尝试让Twitter Bootstrap的.popover工作,我几乎在我的网站上复制了代码,但它告诉我Object [object object]在inspect元素上没有方法'popover'。 I've imported jquery before bootstrap-tooltip.js and bootstrap-popover.js and the files do show up in inspect element. 我在bootstrap-tooltip.js和bootstrap-popover.js之前导入了jquery,并且文件确实显示在inspect元素中。 Here's the actual button i'm trying to get a popover for: 这是我想要获得弹出窗口的实际按钮:

<a href="#" id="example" class="btn btn-success" rel="popover" data-content="It's so simple to create a tooltop for my website!" data-original-title="Twitter Bootstrap Popover">hover for popover</a>

and here's the javascript: 这是javascript:

    $(function(){
            $('#example').popover();
    });

问题是需要在popover.js之前包含tooltip.js。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM