In jQuery when you do this:
$(function() {
alert(\"DOM is loaded, but images not necessarily all loaded\");
});
It waits for the DOM to
For those who want to be notified of download completion of a single image that gets requested after $(window).load
fires, you can use the image element's load
event.
e.g.:
// create a dialog box with an embedded image
var $dialog = $("");
// get the image element (as a jQuery object)
var $imgElement = $dialog.find("img");
// wait for the image to load
$imgElement.load(function() {
alert("The image has loaded; width: " + $imgElement.width() + "px");
});