My attempt at preloading images
<p>Ok I nabbed method C for preloading images from this question 
<a href="http://stackoverflow.com/questions/761263/what-is-the-best-way-to-preload-multiple-images-in-javascript/761332">best way to preload multiple images</a>
I'm trying to implement it into a get Json array </p>

<pre><code>$.getJSON('/pageCall.php',{chapters:chapterNumber}, function(data) 
        {
            chapter=data;
            totalPages = chapter.length;

            var options = '';
            $.each(chapter, function(index, array) {
             images[index] = new Image();
             images[index].src = array['imageLocation'];
});
};
</code></pre>

<p>but when I try and call the images using the following method nothing appears </p>

<pre><code>function callImage(ImageNo)
    {   
        $('#mangaImage').attr('src', images[ImageNo]);
    }
</code></pre>
