-6
rated 0 times
[
0]
[
6]
/ answers: 1 / hits: 15489
/ 13 Years ago, mon, april 11, 2011, 12:00:00
This is the code I use to preload images, I'm not sure if it's the best one.
My question is, how can I fire and event, for an example alert(); dialog after is has finished loading all the images?
var preload = [a.gif, b.gif, c.gif];
var images = [];
for (i = 0; i < preload.length; i++) {
images[i] = new Image();
images[i].src = preload[i];
}
More From » jquery