Skip to content

Instantly share code, notes, and snippets.

@j7u7l7s
Created April 7, 2018 22:59
Show Gist options
  • Save j7u7l7s/9c7a65dee47eb1ad9420a48f01b78114 to your computer and use it in GitHub Desktop.
Save j7u7l7s/9c7a65dee47eb1ad9420a48f01b78114 to your computer and use it in GitHub Desktop.
$(window).load(function() {
$('.swatch-image').each(function() {
var srcImageError = ''; // URL Goes here
if (!this.complete || typeof this.naturalWidth == "undefined" || this.naturalWidth == 0) {
this.src = srcImageError;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment