Posted By

focal55 on 03/15/12


Tagged

image preloader


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

spee66
BrockSamsom


Show Preloader while loading Images with JQuery


 / Published in: jQuery
 

Thank you marcg for posting this on Snipplr http://stackoverflow.com/questions/1379994/detect-when-a-specific-image-has-finished-loading

  1. <script>
  2. $(function () {
  3. var img = new Image();
  4. $(img).load(function () {
  5. $(this).hide();
  6. $('#loader').removeClass('loading').append(this);
  7. $(this).fadeIn();
  8. }).error(function () {
  9. // notify the user that the image could not be loaded
  10. }).attr('src', 'http://farm3.static.flickr.com/2405/2238919394_4c9b5aa921_o.jpg');
  11. });
  12. </script>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: cheapbags on March 16, 2012

I just have the same idea, Are you searching for finest Cheap Hermes Birkin ? buy Original Leather Hermes Bags Online Sale, 100% guaranteed, you could come to our store and find one handbags you love. and we will tell you Hermes latest news from Hermes Birkin blog.

You need to login to post a comment.