<nav class="navbar navbar-inverse navbar-fixed-top my-header" >
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only "> Toggle navigation</span>
<span class="icon-bar "></span>
<span class="icon-bar "></span>
<span class="icon-bar "></span>
</button>
<ul class ="nav navbar-nav>
<li><a href="#" class="btn btn-lg btn-danger" data-toggle="popover" title="" data-content="content" role="button" data-original-title="Title">Hover to toggle popover</a></li>
</ul>
</div>
</nav>
虽然我保留了数据切换=&#34; popover#34;它没有出现在twitter bootstrap的navbar链接中。
答案 0 :(得分:0)
出于性能原因,Tooltip和Popover data-apis是选择加入的,这意味着您必须自己初始化它们:
$('body').popover({
selector: 'a[data-toggle=popover]',
container: 'body'
}).tooltip({
selector: "a[data-toggle=tooltip]",
container: 'body'
});
答案 1 :(得分:0)