Created
March 20, 2024 13:10
-
-
Save MrSwed/ca266bd6086d41b8d00da58b63d55729 to your computer and use it in GitHub Desktop.
retry load not loaded img on site page with too mane photos
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
jQuery(function(jQuery){ | |
function catalogLoad() { | |
let l = $("img[src*=photo]").filter(function(i){return this.naturalWidth==0; }).each(function(i){this.src=this.src}).length | |
console.log("try load "+l+" img") | |
if (l>0) { | |
setTimeout(catalogLoad, 3000); | |
} | |
} | |
setTimeout(catalogLoad, 3000); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment