OK, that shouldn't be too much of a problem. The easiest way to do this if you don't have much content to display under the images would be to make an array of hashes which contain the text and the url of the image, then set that content in the onclick of the images.
Something like:
Code:
var data = [
{src: "../images/image1.jpg", text: "image one..."},
{src: "../images/image2.jpg", text: "image two..."}];
function show(data) {
var img = document.getElementById("image");
var txt = document.getElementById("text");
img.src = dara.src;
txt.innerText = data.text;
}
<a href="#" onclick="show(data[0]); return false;">One</a>
<a href="#" onclick="show(data[1]); return false;">Two</a>
<div>
<img id="image" src="../images/image1 />
<p id="text">Text here</p>
</div>
hth,
Douglas
Bookmarks