每当我打开jQuery对话框时,我都希望无法在#view
中选择任何内容 $("#open-dialog").on("click",function(evt) {
$("#dia-show").dialog({
width: 195,
position: {
at: 'center',
of: $('#view')
},
draggable: true,
appendTo: "#view",
modal:true
});
return false;
parent().draggable({
containment: '#view'
});
});
答案 0 :(得分:1)
将modal
设置为true将启用后台无法点击:
$("#open-dialog").on("click",function(evt) {
$("#dia-show").dialog({
width: 195,
position: {
at: 'center',
of: $('#view')
modal:true
draggable: true,
appendTo: "#view",
});
return false;
parent().draggable({
containment: '#view'
});
});