Javascript Bootstrap Popover:它将消失,而不是保持活动状态
我正在处理Bootstrap Popover,我被卡住了。当我点击按钮时,弹出框显示出来,很快它又消失了。它不会一直可见 此外,当我总是点击按钮,弹出窗口显示时,网页上的图像会闪烁,这很奇怪。我一直在尝试不同的popover配置,但它很奇怪,我无法让它工作 顺便说一句,我正在使用RubyonRails和Bootstrap/jQueryGem 这是我的代码:Javascript Bootstrap Popover:它将消失,而不是保持活动状态,javascript,jquery,ruby-on-rails,popover,Javascript,Jquery,Ruby On Rails,Popover,我正在处理Bootstrap Popover,我被卡住了。当我点击按钮时,弹出框显示出来,很快它又消失了。它不会一直可见 此外,当我总是点击按钮,弹出窗口显示时,网页上的图像会闪烁,这很奇怪。我一直在尝试不同的popover配置,但它很奇怪,我无法让它工作 顺便说一句,我正在使用RubyonRails和Bootstrap/jQueryGem 这是我的代码: <div class="span9"> <table class="table"> <thea
<div class="span9">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Domain</th>
<th>API KEY</th>
<th>API SECRET</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>http://www.example.com</td>
<td>29383947382</td>
<td><a href="#" class="btn btn-small btn-warning" id="api_secret" rel="popover" data-content="b23v2v3l3pdns9282b3v2g3b2" data-original-title="Your API SECRET:">Show</a></td>
</tr>
</tbody>
</table>
</div>
文件底部的这些Javascript行:
<script type="text/javascript">
$(document).ready(function() {
// Popovers
$('#api_secret').popover({
animation: false
});
// Tabs
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
});
</script>
我认为您在做两次popover:一次是通过rel属性,另一次是通过JavaScript。尝试从HTML.Removed中删除rel=popover,它仍然在发生。