我正在尝试创建一个登陆页面,其中多个元素都会触发 jQuery UI 表单,并且计时器会弹出该表单。
它似乎适用于除 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,第 31 行字符 21
有人对此有什么想法吗?我有点困惑,因为我从来没有遇到过 jQuery 不能在 IE 中工作的问题。我猜这可能是 IE9rc1 的一个错误,既然如此,那就这样吧。
修改, 我应该添加我的触发代码..
$('#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 1.5.1(现已发布)修复了此问题。门票在这里:http://bugs.jquery.com/ticket/8123
关于Internet Explorer 9 rc1 中的 jQuery UI 对话框错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5032594/