我想要添加一些弹出窗口到我的示例页面,以下代码不起作用?我已经包含了CSS和引导程序文件。当你点击它时,没有任何反应,但是如果我在bootstrap站点上的示例中尝试它,一切都很好。
我遗漏了什么?转盘工作正常,所以所有链接都是正确的?
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>发布于 2014-10-03 19:49:05
它可以是几件事。由于您的按钮"data“属性是OK的,而且我看不到您的HTML源代码,所以我将尝试猜测:
如果这对您没有帮助,请将您的示例放到http://jsfiddle.net/上或发送网址,这样我就可以调查问题出在哪里。
附注。我正在编辑答案与工作示例在这里http://bootply.com/vxw2PDRBkA,如果您删除JS代码弹出将停止工作。
发布于 2014-10-03 19:54:32
尝尝这个
<a href="#" tabindex="0" class="btn btn-lg btn-danger" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?">Dismissible popover</a>通过JavaScript启用弹出功能用法:
$('#example').popover(options)see an exemple here
发布于 2014-10-06 05:45:09
将"pover“添加到按钮的类
<button type="button" class="btn btn-lg btn-danger pover" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">Click to toggle popover</button>https://stackoverflow.com/questions/26178306
复制相似问题