I was working on organizing a bunch of images into folders and then creating a web page so I can views them all in a nice little package. I've normalized all files and folders to be named by a basic numeric pattern. I was able to display all of the images nicely but now I want to have them all link to their respective folders.
I may not be understanding the problem well enough to be able to do an appropriate search for the answer. I'm thinking all I need to do is append my image node to an anchor node somehow.
Here is what I have so far:
<body>
<div id="volumeCovers"></div>
<script>
var container = document.getElementById('volumeCovers');
var images = 12;
for (var i = 1; i <= images; i++) {
var img = new Image();
img.setAttribute('src', 'volumes/pics/v' + i + '.jpg');
container.appendChild(img);
}
</script>
<body>