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

前端 未结 12 1053
一向
一向 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:19

    $(document).ready() tells you when the dom is ready, but not all assets are necessarily done coming in.

    If you want to make sure all the assets are actually done loading, use $(window).load() instead. The most common use for this is to make sure that images are done loading, but it may work for your script problem as well.

提交回复
热议问题