views:

51

answers:

2

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(){
    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?

A: 

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!

Makram Saleh
A: 

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

(chrome DOES have problems with this function)

Nealv