我正在尝试创建一个登录页面,其中多个元素都触发了一个jQuery UI窗体,同时还有一个计时器弹出窗体。Internet Explorer 9中的jQuery UI对话框错误rc1
它似乎工作在除IE9之外的所有东西,这是奇怪的,因为IE9是迄今为止最好的! (< /蠕虫>)
我使用
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"></script>
<script type="text/javascript">
$(function(){
var signup_step = '<?= $step ?>';
$('#signup-lightbox').dialog({ //line 31
width: "457px",
modal: true,
autoOpen: false,
closeText: '',
position: ['center','top']
});
//etc
</head>
<body>
<div id="signup-lightbox"><!-- etc --></div>
SCRIPT438:对象不支持属性或方法 '的getElementsByTagName'
jquery.min.js 16行字符59007
SCRIPT438:对象不支持属性或方法'对话框'
landing1,line 31 character 21
有人对此有任何建议吗?我有点困惑,因为我从来没有遇到与jQuery不在IE中工作的问题。我想这可能是一个IE9rc1的bug,在这种情况下,就这样吧。
修改, 我要补充我的触发代码..
$('#navigation a, .profile a, .profile > img, .profile > h2').click(function(e){
e.preventDefault();
amendForm();
openLightbox();
});
if($('#signup-lightbox').dialog("isOpen") == false && (signup_step == 'index' || signup_step == undefined)){
setTimeout(function(){
amendForm();
openLightbox();
}, 3000);
}
确保你的jQuery UI库正在从CDN加载。 – Stephen 2011-02-17 21:56:23