我遇到了一个问题,关于jquery-ui对话框
。
问题在于当我关闭对话框后,再次点击触发它的链接时,它不会再次弹出,除非我刷新页面。
如何在不刷新页面的情况下重新调用对话框。
以下是我的代码:
$(document).ready(function() {
$('#showTerms').click(function()
{
$('#terms').css('display','inline');
$('#terms').dialog({
resizable: false,
modal: true,
width: 400,
height: 450,
overlay: { backgroundColor: "#000", opacity: 0.5 },
buttons:{ "Close": function() { $(this).dialog("close"); } },
close: function(ev, ui) { $(this).remove(); },
});
});
谢谢
dialog
函数用于初始化、显示和隐藏的想法让我理解了这一点。谢谢。 - Steve Cooper