+3  A: 

How to check that image is loaded. It is using the jquery ajax load() function.

Elzo Valugi
+1  A: 

JQuery Image Loading

In our basic version, we will have a single div containing a loading spinner and once our large image is loaded (in the background) we will remove the spinner and insert our image.

You know when the image has been successfully loaded, when the exectution reaches the function pointed to in the success option, e.g.:

$.ajax({
  url: 'image-map.php',
  data: 'img=' + i.src, // the image url links up in our fake database
  dataType: 'html',
  success: function (html) {
    // because we're inside of the success function, we must refer
    // to the image as 'img' (defined originally), rather than 'this'
    $('#loader')
      .removeClass('loading')
      .append(img)
      .append(html);

    // now show the image
    $(img).fadeIn();
  }
});
The MYYN
Thanks for GTFM ))
Roman
+1  A: 

jQuery had a load method that can be used to notify you when an image has downloaded. So in your case you would use jquery to make an ajax request that would return a src to the image and then create a new image object and apply the load method like below.

var $img = $('<img>');
$img.attr('src', 'image.jpg').load(function() {
   alert('Image Loaded');
   //use jquery here to insert your image into the DOM
});

I hope that's clear. I assumed you knew how to make an ajax request if you were asking about image loading.

Thanks Nick

Nick Lowman
Also there's a great page here that has some excellent jquery tips and where I originally read about using the load method for imageshttp://www.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx
Nick Lowman