我一直在寻找有关为什么弹出窗口不起作用的答案。我检查了我的 JS 文件(最新版本)中的弹出窗口代码,它就在那里。 Jquery 用于主页上的导航和轮播。我直接从 Bootstrap 的网站复制并粘贴了按钮的代码。我做错了什么?
去这个页面看问题:http://staging.ceobusinessalliance.com/site-selectors/creative-incentives/它是最顶部的按钮。
谢谢!
最佳答案
您必须首先启用弹出窗口功能,如 Bootstrap 文档中所述:
For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.
你可以通过在你的 html 末尾包含这个小脚本来做到这一点:
$(document).ready(function () {
$('[data-toggle="popover"]').popover();
});
关于javascript - Bootstrap 3 弹出框不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24332591/