Skip to content

Instantly share code, notes, and snippets.

@pauloabmiranda
Last active September 24, 2015 13:43
Show Gist options
  • Save pauloabmiranda/9052481 to your computer and use it in GitHub Desktop.
Save pauloabmiranda/9052481 to your computer and use it in GitHub Desktop.
Image Loading Complete
function isImageLoaded(image, $elem){
if(!image.complete){
requestAnimationFrame($.proxy(this.isImageLoaded, this, image, $elem));
}else{
$elem.removeClass('loading');
$elem.data("loaded", "true");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment