0

我刚刚将 jQuery UI 对话框放入网页中。这是我第一次使用它。我以为我已经正确设置了 bgiframe 属性,但是当我在 IE6 中检查它时,它仍然落后于下拉列表。这是我的 JavaScript 代码。页面上没有任何闪光。一个简单的 div,其中包含文本和围绕“jClick”的一些文本的锚点。任何想法为什么会在 IE6 中发生这种情况?

$(document).ready(function(){
    $("#dialog").dialog({
      bgiframe: true, autoOpen: false,
      overlay: { backgroundColor: '#000', opacity: 0 },
      width: 400,
      height: 200,
      modal: true,
      buttons: {
                'Delete all items in recycle bin': function() {
                    $(this).dialog('close');},
                Cancel: function() {$(this).dialog('close');}
            }
    });

    $("#jClick").click(function(event){
        $("#dialog").dialog('open');
        event.preventDefault();
    });

});
4

2 回答 2

3

你需要使用一个 jquery 插件,它叫做 bgiframe iirc。在那里你会找到你看到的行为的解释。

于 2009-11-16T04:38:59.083 回答
2

您还需要包含 bgiframe 插件 js。将 bgiframe 设置为 true 是不够的。也许 ui 应该自己实现它,因为它是一个静默依赖,它会失败而不会出错,不确定我是否喜欢它。

在这里获取它http://plugins.jquery.com/project/bgiframe

于 2009-11-16T11:32:33.787 回答