【发布时间】:2014-01-03 03:54:41
【问题描述】:
如何使我的弹出窗口在窗口区域内可点击而不关闭,但在点击区域外时自动关闭?
这是我当前通过单击按钮触发的代码:
if (response.Success) {
return showErrorPopup(errorButton, 'Error!', response.Entity.Exception);
} else {
return showErrorPopup(errorButton, 'No Error', response.Message);
}
以及打开弹窗的功能:
showErrorPopup = function(popupElem, title, content) {
return popupElem.popover({
animation: false,
title: title,
content: content,
placement: 'left',
trigger: 'focus',
html: true
}).popover('show');
};
我尝试了 trigger: 'click' 并允许弹出窗口保持打开状态,但在窗口外单击时不会自动关闭它。
【问题讨论】:
标签: javascript html ajax