admin管理员组

文章数量:1296221

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>

and here's the javascript:

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

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>

and here's the javascript:

    $(function(){
            $('#example').popover();
    });
Share Improve this question asked Jun 11, 2012 at 18:46 Gavin SellersGavin Sellers 6641 gold badge15 silver badges27 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

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

本文标签: javascriptTwitter bootstrap popover not workingStack Overflow