this question에서와 동일한 문제가 발생하지만 모든 브라우저에 적용됩니다. 나는 당신의 문제가이로드되기 전에 .dialog() 메소드는 내용의 높이를 알 수 없다는 것입니다 생각jQuery 대화 상자가 가운데에 표시되지 않습니다.
$('form#main').live('submit', function(e) {
e.preventDefault();
var $this = this;
////console.log('click submit')
var $div = $('<div>', {
html: 'Are you sure you want to submit this table?<br/> All undo information will be lost.'
}).dialog({
modal: true,
title: 'Are You Sure?',
buttons: {
ok: function() {
self.console('clicked ok');
$.post($this.action, $($this).serialize() + '&page=' + self.pageOn, function(data) {
self.console(data);
$('.DEV-time').text(" (File last updated at: " + data.DEV + ")");
$('.PROD-time').text(" (File last updated at: " + data.PROD + ")");
if(data.ERROR.length > 0){
alert(data.ERROR);
}
self.pageChanged = false;
self.origPage = $('#page').clone();
self.lastClick = $('#page').clone();
}, 'json')
$(this).dialog('close');
},
cancel: function() {
$(this).dialog('close');
}
},
beforeClose: function() {
$(this).remove();
}
})
$div.dialog('widget').css('margin', '0 auto');
return false;
})
그건 흥미 롭 군. – Brandon
하지만 의미가 없습니다. – Neal
Btw, 누락되었습니다. 대화 상자 정의를 닫을 때 방금 삭제 한 행 바로 앞에 있습니다. – eagerMoose