我的网站上有一个jQuery Tools Modal Overlay,它在Chrome和Firefox中都运行得很好……但是,当我在IE8中查看页面时,黑色背景蒙版出现在对话框DIV的顶部…另外,div出现在页面底部,实际代码与屏幕
此外,我也得到其中一个“第1行第6个错误”错误“,我似乎无法调试这个坏男孩.我在Chrome中遇到类似的错误”Uncaught SyntaxError:Unexpected token)“但是它不会干扰模态.我有一种感觉它无关,但对于IE,你永远不会知道.
任何帮助将非常感谢!!
JS档案
var api;
showDiv('partmodal');
function showDiv(v){
if (!document.getElementById(v)) return;
if (api)
if (api.isOpened) api.close();
api=$('#'+v).overlay({
mask: {color: '#000000'},
effect:'drop',
api: true
}).load();
}
DIV对象
<div class="modalpart" id="partmodal">
<h2>
Title <!--It doesn't matter what you put here-->
</h2>
<!--It doesn't matter what you put here-->
</div>
CSS
.modalPart {
background-color:#fff;
display:none;
width:550px;
padding:15px;
text-align:left;
border:2px solid #600;
-moz-border-radius:6px;
-webkit-border-radius:6px;
-moz-box-shadow: 0 0 50px #ccc;
-webkit-box-shadow: 0 0 50px #ccc;
position:fixed;
_position:absolute;
}
.modalpart h2 {
background:url(images/logoac.png) no-repeat;
margin:0px;
padding:10px 0 10px 110px;
border-bottom:1px solid #333;
font-size:20px;
color:#600;
font-family:calibri, hevetica, tahoma, arial;
text-align:right;
}
ACK!添加以下内容已更正此问题
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
在我开始调试20小时后,我不得不停止解决自己的问题,但是在我发布求助后30秒.
希望这也会帮助其他人.
