我正在使用jQuery,并将内容加载到div中,然后将其显示为对话框。但是,它不是集中在对话框中。jQuery UI对话框不居中
有没有人有解决方案?
代码:
function Core_Load_Register()
{
$("body").append("<div id='Register_Popup'></div>");
$("#Register_Popup").load("index.php?section=FrontPage&page=Register&nogui=true");
$("#Register_Popup").dialog({
modal: true,
height: "auto",
width: "auto",
buttons:
{
"Register New Account":
function()
{
},
"Cancel":
function()
{
$(this).dialog("close");
}
}
});
}
实例截图:
jQuery Dialog not Centered Example http://oi54.tinypic.com/nlznl4.jpg
尝试这样做:http://stackoverflow.com/questions/1467102/dialog-box-not-positions-center-screen –
试过但没有为我工作。 –
我不确定您的对话框代码在DOM中的位置,但我会尝试将它作为“