Twitter bootstrap jquery ui对话框,引导程序居中,位置不固定
我使用jQueryUI对话框与表单进行对话。此外,我还使用bootstrap进行格式化,并使用jquery ui bootstrap进行组合() 对于对话框初始化,我使用此代码。我试图使对话框出现在屏幕中央,但它并没有固定的位置。所以当用户滚动时,对话框将移开。可能吗Twitter bootstrap jquery ui对话框,引导程序居中,位置不固定,twitter-bootstrap,jquery-ui,Twitter Bootstrap,Jquery Ui,我使用jQueryUI对话框与表单进行对话。此外,我还使用bootstrap进行格式化,并使用jquery ui bootstrap进行组合() 对于对话框初始化,我使用此代码。我试图使对话框出现在屏幕中央,但它并没有固定的位置。所以当用户滚动时,对话框将移开。可能吗 function addProjectDialog(event){ event.preventDefault(); unselectTableItem(); closeAllDialogs();
function addProjectDialog(event){
event.preventDefault();
unselectTableItem();
closeAllDialogs();
var form = $("#newProjectFormContainer");
form.dialog({
title: "New project",
autoOpen: false,
position: {
my: 'center',
at: "center"
},
width: 'auto',
height: 'auto',
beforeClose: function(){
$.noty.closeAll()
}
});
form.dialog('open')
form.find('.text').val("")
form.find('.date').val(getTodayDate())
form.find('.date').datepicker({
dateFormat: "yy-mm-dd"
});
form.find('option:selected').removeAttr('selected')
form.find('textarea').val('')
}