[英]answers Bootstrap 3 popover Show Delay
我使用 Bootstrap 弹出框添加了一个工具提示,一切正常。 告诉我你怎么可以升级这个代码,让你hover鼠标在打开之前添加2秒延迟呢?
$(".reward-info").popover({
trigger: "manual",
html: true,
animation:false,
placement : "top"
})
.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);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.