hello.. i have this code but i dont know what to do next..
var toBeInsertedToAS = "";
for(j=1;j<=10;j++)
{
$('<img />')
.attr('src','imgUrl_'+j+'.png')
.load(function(){
toBeInsertedToAS += $(this).attr('src')+"|";
});
theSetDataCount++;
}
alert(toBeInsertedToAS);
i just want to have this output..
imgUrl_1.png|imgUrl_2.png|imgUrl_3.png|etc...
but as what i can see, after the loop, there's no output.. maybe because it goes to alert(toBeInsertedToAS) without loading the pictures completely.. i just want to completely load the pictures first before it will execute the alert..