Last active
December 14, 2015 04:18
-
-
Save dejanr/5026913 to your computer and use it in GitHub Desktop.
Hack for image load
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cached images don't fire load sometimes, so we reset src. | |
// this is DOM Node | |
if (this.complete || this.complete === undefined){ | |
var src = this.src; | |
// webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f | |
// data uri bypasses webkit log warning (thx doug jones) | |
this.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; | |
this.src = src; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment