Twitter bootstrap .popover无法正常工作 [英] Twitter bootstrap .popover not working

查看:65
本文介绍了Twitter bootstrap .popover无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使Twitter Bootstrap的.popover工作,并且我已经在网站上复制了很多代码,但是它告诉我Object [object object]在inspect元素上没有方法'popover'.我已经在bootstrap-tooltip.js和bootstrap-popover.js之前导入了jquery,并且文件确实显示在inspect元素中.这是我尝试获取的弹出框的实际按钮:

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. I've imported jquery before bootstrap-tooltip.js and bootstrap-popover.js and the files do show up in inspect element. 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>

这是javascript:

and here's the javascript:

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

推荐答案

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

The problem was that tooltip.js needs to be included before popover.js.

这篇关于Twitter bootstrap .popover无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆