Hi there,
What I am trying to achieve is a grid of images (10x10) that firstly load after the rest of the page has finished loading, and secondly fade in 1 after another
i.e. (represents only one line)
----------
+---------
++--------
+++-------
++++------
etc... What I have so far is this:
<script type="text/javascript">
var loadingImage = false;
function LoadImage(imageName,imageFile)
{
if ((!document.images) || loadingImage) return;
loadingImage = true;
if (document.images[imageName].src.indexOf(imageFile)<0)
{
document.images[imageName].src = imageFile;
}
loadingImage = false;
}
LoadImage('0','images/0.jpg');
</script>
With this image tag
<img class="fade" name="0" onLoad="LoadImage('1','images/1.jpg')" />
This gives me half the solution in as much as it loads all the images in sequentially, but I cant seem to add a fade to these images. The images are set up in an UL with 10 pictures in each LI, and 10 LI's in total = 100 images.
How can I fade these in? Also is there a way to print out all the images in a loop insted of having them manually written in, so the user doesnt have to go through and make sure every image tag is correctly named? (ive already got a batch image renamer)
I found This which is similar to what I need, but I couldnt work out how to get it to load the way I want. Thanks