【发布时间】:2012-05-29 19:16:45
【问题描述】:
我有一个 div,我正在制作一个对话框,然后在准备好文档时打开它。
对话框显示,但没有响应单击 x 关闭或单击确定按钮。
我正在使用 jquery-ui,以及由 themeroller 创建的自定义主题:http://jqueryui.com/themeroller/
如果我不将其作为 Facebook 应用程序运行,该代码在 IE 中可以运行,如果我使用不同的浏览器(Safari、Chrome、Firefox),它也可以作为 Facebook 应用程序运行。
IE java控制台显示jquery-ui代码报错:
脚本 16389:未指定的错误。
jquery-ui-1.8.20.custom.min.js,第 73 行字符 5487
代码如下:
<head>
<link type="text/css" href="/jquery/css/start/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/jquery/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/jquery/js/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript">
function showPopup() {
$( '#dialog' ).dialog('open');
}
$( function () {
$('#dialog').dialog({ autoOpen: false, show: "blind", hide: "blind", buttons: { "OK": function() { $(this).dialog("close"); } } });
}) ;
</script>
</head>
<body>
<script type="text/javascript">
$(function(){showPopup();});
</script>
<div id='dialog' style="display: none;" title='title of the dialog'>
Dialog message
</div>
</body>
【问题讨论】:
-
在黑暗中刺伤 - 您是否可能在代码中的某处留下了一些
console.log()语句? IE 不太喜欢它——尤其是在调试控制台未打开的情况下。还有什么版本的 IE 会有很大的帮助...它不是 IE 6...我知道很多:P -
我目前可以用 IE9 重现这个。我也用 IE8 看到过它,但没有那个系统设置来重现它。此外,我可以在没有其他代码的隔离页面上重现它。
标签: jquery facebook internet-explorer dialog jquery-ui-dialog