Sorry for the vague title, I'm very new at this! This is my second post on this forum; the first was very successful.
I have a link, which will hopefully change two divs simultaneously.
At the moment, I can only get one div to work at a time:
How would I combine these so the div and the image changes?HTML Code:<a href="#" onClick="changeDetails(0);">LINK</a> <a href="#" onClick="documentGetElementById('bgimg').src='img/00.jpg'">LINK</a>
The JS looks like this:
I hope this is clear enough. Thanks!Code:function changeDetails (num) { document.getElementById("details1").innerHTML = anArray[num]; }



Reply With Quote
Bookmarks