jQuery UI dialog: window appears at the right of the screen in chrome and safari
anybody else had this problem, 开发者_如何学Cdo you know how to fix this ?
my code:
var currentFormconfirm;
$(function () {
$("#dialog-confirm-confirm").dialog({
resizable: false,
height: 220,
width: 400,
modal: true,
autoOpen: false,
buttons: {
'Yes': function () {
$(this).dialog('close');
currentFormconfirm.submit();
},
'Cancel': function () {
$(this).dialog('close');
}
}
});
$(".confirm").click(function () {
currentFormconfirm = $(this).closest('form');
$("#dialog-confirm-confirm").dialog('open');
return false;
});
});
fix it, by using the latest version of Jquery.js
and .css
I too have this problem. My solution:
$('#dlg')
.dialog('open')
.dialog({position:'center'}); //UI Dialog positioning error
精彩评论