I have a javascript that basically loads an array of names, and then it loads each one of those images from another website.
They're of course flickering like **.
I would like to preload these images, but since they change every 3 seconds, it's really hard to preload them.
However, only some of the images change.
You can see how it happens on this link when pressing the Factions "player count".
The current code i have is this:
$.ajax({
type: "GET",
url: "updater/updateFactions.php"
}).done(function(data) {
var newData = data.split(":");
document.getElementById('factions').innerHTML = newData[0]+"/"+newData[1];
var playerData = newData[2].split(",");
var data = "";
for(i in playerData) {
data += "<img src='http://signaturecraft.us/avatars/5/face/" + playerData[i] + ".png'>";
}
document.getElementById('factionsplayers').innerHTML = data;
});