【发布时间】:2013-04-03 20:57:34
【问题描述】:
我正在使用 jquery 模态对话框,我需要能够将其定位在页面的左侧,但我的代码无法设置位置。我做错了什么?
var $dialog;
function dialog(url) {
$.get(url, {}, function (html) {
$dialog = $('<div id="dialog" title="Create New Case"></div>').dialog({
autoOpen: false,
modal: true,
close: function () {
$("#dialog").remove();
}
});
$dialog.html(html);
$dialog.dialog("option", "width", "auto");
$dialog.dialog("option", "height", "auto");
$dialog.dialog("option", "left", "1%");
$dialog.dialog("open");
});
}
【问题讨论】: