开发者

jQuery UI dialog error in Internet Explorer 9 rc1

I am trying to create a landing page, where multiple elements all trigger a jQuery UI form, and also a timer pops the form.

It seems to work in everything except IE9, which is odd, as IE9 is the best one so far! (</开发者_开发百科worms>)

I'm using

<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: Object doesn't support property or method 'getElementsByTagName'

jquery.min.js, line 16 character 59007

SCRIPT438: Object doesn't support property or method 'dialog'

landing1, line 31 character 21

Anyone have any ideas on this one please? I'm a little puzzled, as I've never had problems with jQuery not working in IE. I guess it might be a bug with IE9rc1, in which case, so be it.

Amend, I should add my trigger code..

$('#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 (available now) fixes this issue. The ticket is here: http://bugs.jquery.com/ticket/8123


According to this blog post, jQuery UI 1.8.7+ only supports jQuery versions up to 1.4.4.

You're using jQuery 1.5.

Looking ahead to the release notes for UI 1.8.8 and UI 1.8.9 I didn't see any notes regarding further jQuery support, so I assume UI 1.8.9 is still only compatible with jQuery 1.4.4.

I would downgrade jQuery to 1.4.4 and see if the bug still exists.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜