IE 的 jQuery UI 对话框问题 [英] jQuery UI Dialog Issue With IE
问题描述
我正在使用新的 jQuery 1.3.2 和 jQuery-ui-1.7 库以及 UI 对话框.我有一个 div 标签,里面有几个表单元素(文本框、复选框等).页面加载后,jQuery 将 div 显示为对话框.这在 FF 中工作得非常好,但在 IE 中,div 的高度是错误的.它只是显示标题栏的一些内容.我在创建 div 时明确设置了高度.如果我在打开对话框后设置了高度选项,高度会被纠正,但内容是空白的(显示文本框的前三分之一).如果我允许调整对话框的大小,如果你在 IE 中调整它的大小,它可以正常工作,但我不想强迫 IE 用户调整大小只是为了查看内容.有任何想法吗?这是我用来创建对话框的代码:
I am using the new jQuery 1.3.2 and jQuery-ui-1.7 libraries along with the UI Dialog. I have a div tag with several form elements (textbox, checkbox, etc.) in it. Upon page load, jQuery shows the div as a dialog. This works absolutely fine in FF, but in IE, the height of the div is wrong. It is just showing the title bar a bit of the content. I explicitly set the height when creating the div. If I set the height option after opening the dialog, the height is corrected, but the content is blank (shows the top third of a textbox). If I allow the dialog to be resizable, if you resize it in IE it works fine, but I don't want to force IE users to resize just to see the contents. Any ideas? Here is the code I use to create the dialog:
$('#dialogDiv').dialog({
bgiframe: true,
height: 400,
width: 620,
modal: true,
draggable: true,
resizable: false,
close: function(event, ui) {
if($('#agree').val() != '1')
location.href = 'somepage.html';
}
});
推荐答案
我已经回答了我自己的问题.我只需要使用对话框的高度属性和对话框中的一些元素.好叫我!
I have answered my own question. I just had to play with the height properties of dialog and some of the elements within the dialog. Good call me!
这篇关于IE 的 jQuery UI 对话框问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!