我正在做这个演示。我试图找出为什么弹出窗口在按.close
按钮关闭后第一次单击时不起作用。
$("#pop-One").popover({
placement: 'right',
html: 'true',
title : '<span class="text-info" style=""><strong>Model Type</strong></span>'+
'<button type="button" class="btn btn-default close" onclick="$("#pop-One").popover("hide");">×</button>',
content : '<p class="popup" style="color:#323232;"> \Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s,</p>'
});
@import 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css';
@import 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css';
body{padding:20px;}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<div class="container">
<button type="button" class="btn btn-default" id="pop-One" data-toggle="popover"><i class="fa fa-question"></i></button>
</div>
无论出于何种原因,关闭按钮在这里都不起作用。我已经看过这篇文章,但这是另一种方法。