我使用 asp.net mvc 剃须刀代码。我使用 qtip 在鼠标悬停时显示弹出窗口。我在设置页面中有一个复选框,用于启用/禁用 qtip。
这是我的代码:
function tooltip(a) {
Sapppid = document.getElementById("s" + a).textContent;
Sapppid = Sapppid.replace("s", "");
$.ajax({
url: window.location.pathname + "Scheduler/getappointmentdetails",
type: "POST",
data: { sharedappid: Sapppid }
})
.success(function (result) {
document.getElementById('ApptDetails').value = result;
});
$("#" + a).qtip({
overwrite: false,
content: {
text: "...",
button: 'Close',
ajax: {
url: window.location.pathname + "Scheduler/Eventdetails/" + Sapppid,
type: 'Post',
success: function (result) {}
}
},
style: {
classes: '',
width: 500
},
position: {
my: 'right bottom center',
at: 'middle right center',
target: $("#" + a)
},
show: {
ready: true,
solo: true
},
hide: {
when: { event: 'mouseout unfocus' }, fixed: true, delay: 200
}
});
}
我设计 qtip 以显示在动态内容上。我使用qtip2。我在站点中找不到任何要禁用或启用的文档。
这是我找到的唯一代码,但无法弄清楚在哪里应用它。:
api.disable(true);
// Enable it again
api.disable(false);