开发者

Is something wrong about $(window).load() and Google Chrome?

Sometimes, it just doesn't do what I told it to do. It works perfectly in firefox and IE, but chrome just ignore the instructions. Even something as simple as:

$(window).load( function()开发者_StackOverflow社区{
    alert( 'hello world!' );
});

I think the problem is when I try to use 2 $(window).load()

Is anyone else experiencing this problem or is just me? I mean, does this "bug" actually exists or am I doing something wrong?


Try putting the script at the bottom of the page right before </body> tag.

(chrome DOES have problems with this function)


I'm having similar issues, not this specific one though. I came to believe that it's because of caching. It seems that a cached page is too fast for jQuery's window.load event to fire. Just speculating!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜