如果是点击显示,则需要再次点击原处,才 能关闭弹窗,所以,用滑动功能可以解决,只是手机版上怕是不行.
弹窗中支持超链接
<div class="div1">
<li role="button"data-toggle="popover"data-placement="left"
title="Related goods" data-content="<a style='width:120px;' href='/?a=cp5'>123</a>">
<span>1550nm</span>
</li>
</div>
$(".div1 li").popover({ trigger: "manual" , html: true, animation:false})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});