Hello,

For a project I am working on I am looking to replicate the text acordian / image gallery such as from the drawing and illustration galleries of http://www.misprintedtype.com/v4/

The accordian part is straight forward. I was looking for some ideas for the loading an image into a acordian content div. There are going to be many many images so I don't want to pre-load them.

I had been using a code but found, even outside of the accordian it would load extremely slowly and sometimes not at all:

<html>
<head>
<script type="text/javascript">
<!--
function getImage(pExistingImageID, pImageURL){
var img = document.createElement('img');
img.onload = function (evt) {
document.getElementById(pExistingImageID).src=this.src;
document.getElementById(pExistingImageID).width=this.width;
document.getElementById(pExistingImageID).height=this.height;
}
img.src = pImageURL;
return false;
}
//-->
</script>
<title>Remote Image 5</title>
</head>

<body>
<p><a href="#" onclick="return getImage('placeHolder','/images/rdivilbiss.jpg');">Get Remote Image</a></p>
<p><img id="placeHolder" border="0" src="/images/placeHolder.jpg"></p>
</body>
</html>