jQuery $(document).ready() failing in IE6

前端 未结 12 1067
一向
一向 2020-12-06 11:50

I have the following code:

// Creates a timer to check for elements popping into the dom            
timer = setInterval(function ()
{          
    for (p i         


        
12条回答
  •  盖世英雄少女心
    2020-12-06 12:11

    Are you sure that jQuery is loaded? Try debugging with alerts like:

    alert(typeof $);
    

    You could also try a different syntax:

    $(function() {
         clearInterval(timer); 
    });
    

    Ok, so from your comment, the above doesn't help. The "object expected" error seems to occur with a syntax error in my experience. Is that the exact code you've got? If not, could you post it?

提交回复
热议问题