動的コンテンツを使用して、jQuery popUp ダイアログを次のように初期化しています。
jQuery("#popUp").live("click", function (e) {
e.preventDefault();
jQuery("<div></div>")
.addClass("dialog")
.attr("id", "popUpDialog")
.appendTo("body")
.dialog({
title: jQuery(this).attr("data-dialog-title"),
close: function() { jQuery(this).remove(); },
modal: true,
hide: { effect: "none", duration: 150 },
show: { effect: "none", duration: 150 },
width: 'auto',
height: 'auto',
position: {
my: 'center',
at: 'center',
of: jQuery(window)
}
}).load(this.href);
jQuery(".close").live("click", function (e) {
e.preventDefault();
jQuery(this).closest(".dialog").dialog("close");
});
});
});
この最も単純な質問で申し訳ありませんが、ページ全体の中央にポップアップ ウィンドウを配置することはできません。問題は次のとおりです。
position: {
my: 'center',
at: 'center',
of: jQuery(window)}