Guest User

Untitled

a guest
Aug 19th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. $(images).load(function() {
  2.  
  3. // fire this function when an image has loaded
  4.  
  5. // All finished!
  6. $(this).addClass('processed')
  7.  
  8.  
  9. }).error(function() {
  10.  
  11. // fire this when image fails to load. ex) bad url?
  12.  
  13. }).each(function() {
  14.  
  15. // image could be cached, so your load function will never fire
  16. // So check with this:
  17.  
  18. if ($(this).is(':not(.processed)') && isIE && this.complete) {
  19.  
  20. $(this).trigger('load');
  21.  
  22. }
  23.  
  24. })
Add Comment
Please, Sign In to add comment