Studying this and other "ready-made" problems, I think I found a difference in this matter .
Here is a ready-made function handler in jQuery.
ready: function( fn ) {
It seems that you can add any element (even full jibberish) to this function, and its callback will be added to readyList. It also seems that when the document is ready, it calls all the callbacks in the readyList, regardless of whether they are part of the document or not.
See this script for an example: http://jsfiddle.net/w5k5t/2/
I have not fully tested the order for these ready-made calls, but a brief review of the code makes me think that they will be executed synchronously in the order of adding callbacks.
Therefore, $ (document) .ready and $ (window) .ready are synonyms, like $ ('aoeuaoeuaoeu'). ready is a synonym, and each of them is likely to shoot in the order in which they are declared.
source share