I noticed an error in the window.onload function. (Maybe this is my mistake) The problem is that I used the following simple function, it worked on all browsers, but Chrome.
var name=$("#name"); window.onload = function(){ name.fadeIn(500); };
Then just for fun, I tried too:
var name; window.onload = function(){ name=$("#name"); name.fadeIn(500); };
In all of the above cases, the Chrome dev tools gave me this error message:
Uncaught TypeError: Object [object Object] has no method 'fadeIn'
I solved this error with the following code.
window.onload = function(){ var name=$("#name"); name.fadeIn(500); };
But now some explanation is needed, why 2 parts of the code did not work first?
source share