【发布时间】:2016-01-29 04:07:40
【问题描述】:
我正在处理this demo。我试图找出为什么弹出窗口在通过.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>
不管什么原因,关闭按钮在这里不起作用。我已经看过this post,但那是另一种方法。
【问题讨论】:
-
嗨 Shailendra Sharma,我猜你甚至没有看问题,只根据标题来判断!这与那个问题完全不同!
标签: javascript jquery twitter-bootstrap-3 bootstrap-popover