Let us say I have a HTML page that contains a javascript file:
The base.js is like this:
$(document).ready(function () {
obj.init();
}
// .....
The ready event happens when the document is loaded and parsed.
This includes all Javascript files, but not images.
The ready event happens after the document is parsed. Some browsers have a specific event for this, in other browsers jQuery uses a timer that polls the status of the document. This means that the event happens either as soon as the entire document is parsed, or slightly later, depending on the browser. This is normally not a problem, as it doesn't happen before anything of the document is parsed.
If you need all images to be loaded before you do something, you should use the load event instead.