Javascript 单击按钮时显示弹出框
我正在尝试复制演示的按钮弹出效果(现场演示->启动演示模式) 我可以看到按钮的代码如下:Javascript 单击按钮时显示弹出框,javascript,jquery,twitter-bootstrap,Javascript,Jquery,Twitter Bootstrap,我正在尝试复制演示的按钮弹出效果(现场演示->启动演示模式) 我可以看到按钮的代码如下: <a href="#" role="button" class="btn btn-default " title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">button</a> 当我在我的页面上包括这个并点
<a href="#" role="button" class="btn btn-default " title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">button</a>
当我在我的页面上包括这个并点击它时,什么都没有发生
有人能指出我遗漏了什么吗?包括JS调用:
<html>
<!-- include bootstrap css files -->
<body>
<a href="#" role="button" class="btn btn-default " title="" data-content="And here's some amazing content. It's very engaging. right?" data-original-title="A Title">button</a>
<!-- include bootstrap js files -->
<script>$('a.btn').popover()</script>
</body>
</html>
$('a.btn').popover()
您是否调用了$('a.btn').popover()
?不,应该转到哪里?我对Javascript知之甚少,你能给我举个例子吗?