我在处理IE7中标题栏的宽度时遇到了问题。当使用width: 'auto'打开第一个对话框函数时,标题栏不会延伸到整个对话框窗口。使用minWidth的第二个函数有效,但更像是width属性而不是随内容增长的大小。有什么想法吗?
不起作用:
$(dialogId).dialog({
autoOpen: 'false',
modal: true,
draggable: false,
resizable: false,
buttons: buttons,
title: title,
width: 'auto',
open: function(){
/* IE HACK */
$buttonPane = $(this).next();
$buttonPane.find('button:first').addClass('accept').addClass('action');
$('.ui-dialog-titlebar-close').hide();
$('.ui-dialog').addClass('open_dialog');
$(this).css('overflow','hidden');// IE hack
onOpen;
},
close: function(){
$('.ui-dialog').removeClass('open_dialog');
afterClose;
}
});
工作(仅限固定宽度):
$('#conf_dialog').dialog({
dialogClass: dialogclass,
autoOpen: 'false',
modal: true,
draggable: false,
resizable: false,
buttons:buttons,
title:title,
minWidth: 255,
open: function(){
/* IE HACK */
$buttonPane = $(this).next();
$buttonPane.find('button:first').addClass('accept').addClass('action');
$('.ui-dialog-titlebar-close').hide();
},
close: afterClose
});