Non ho controllato se funziona e non mi fa impazzire... ma credo che con qualcosa del genere dovresti riuscirci...
Ciaocodice:var thisObject = this; var aImg = thisObject.aImages; var len = aImg.length; var iImg = 0; var thisImg = null; function recursiveLoad() { if (thisImg) { thisImg.onload = null; thisImg.onerror = null; } thisImg = document.createElement("img"); thisImg.src = thisObject.sanitize(aImg[iImg]); if (iImg < len - 1) { thisImg.onload = recursiveLoad; thisImg.onerror = recursiveLoad; } iImg++; } recursiveLoad();

Rispondi quotando