Skip to content

Commit

Permalink
Further fixing caching problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
peol committed Aug 23, 2010
1 parent a4aad46 commit ab35d83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ahpi.imgload.js
Expand Up @@ -25,7 +25,6 @@
$.event.special.load = {
add: function (hollaback) {
if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {

// Image is already complete, fire the hollaback (fixes browser issues were cached
// images isn't triggering the load event)
if ( this.complete || this.readyState === 4 ) {
Expand All @@ -36,6 +35,10 @@
else if ( this.readyState === 'uninitialized' && this.src.indexOf('data:') === 0 ) {
$(this).trigger('error');
}

else {
$(this).bind('load', hollaback.handler);
}
}
}
};
Expand Down

0 comments on commit ab35d83

Please sign in to comment.