【发布时间】:2011-12-26 19:53:02
【问题描述】:
在 Internet Explorer 8 上使用 jquery.simplemodal 时遇到 javascript 错误;在 chrome、firefox、safari 上运行良好。
错误是 's.d.wrap' 为空或不是第 475 行的对象。
知道如何让它在 Internet Explorer 8 上运行吗?
相关代码。在头脑中:
<script src="ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"; type="text/javascript"></script>
<script src="/system/js/jquery.ui.core.js" type="text/javascript"></script>
<script src="/system/js/jquery.ui.widget.js" type="text/javascript"></script>
<script src="{url:/system/js/jquery.ui.mouse.js}" type="text/javascript"></script>
<script src="/system/js/jquery.ui.sortable.js" type="text/javascript"></script>
<script src="/system/js/jquery.simplemodal-1.4.1.js" type="text/javascript"></script>
对于模态窗口:
$("#detail-pane").animate( { height: gPaneHeight + 'px' }, 500,
function() {
$.modal( "<div id='warning-box' class='warning-box'></div>",
{ closeHTML:"",
containerCss:{ backgroundColor:"#b8b9b9",
height:gPaneHeight,
padding:0,
width:993 },
position: [ 108, ($(window).width() / 2) - (993 / 2) ],
overlayClose:true,
onClose:function(dialog) { closePane(); },
onShow: function(dialog) { // filling in box content
}
});
}
);
提前致谢, 莱昂内尔
【问题讨论】:
-
可能需要检查您在代码中声明内容的方式(如果您希望人们提供帮助,请在此处添加)。另外,请确保您已清除缓存并且 IE 使用的 JS 是最新版本
-
在头部:
codecode -
打开modal的例子:
code$("#detail-pane").animate( { height: gPaneHeight + 'px' }, 500, function() { $.modal( "", { closeHTML:"", containerCss:{ backgroundColor:"#b8b9b9", height:gPaneHeight, padding:0, width: 993},位置:[108,($(窗口).width()/2)-(993/2)],overlayClose:true,onClose:function(dialog){closePane();},onShow:function(dialog ) { // 填写框内容 } }); } );code
标签: jquery simplemodal