I am to add script to a set of links on a page to change the image on that page with the switchPix function every time the mouse moves over the text of 'Asian Art Museum', 'City Hall', etc. I don't even know where to start.
<article>
<h2 id="main">What's Nearby</h2>
<figure id="pix" class="right">
<img src="images/cablecar.jpg" width="480" height="270" alt="cable car turnaround" id="gallery" />
</figure>
<ul>
<li><a href="http://www.asianart.org/" target="_blank">Asian Art Museum</a></li>
<li><a href="http://bit.ly/93E5VI" target="_blank">City Hall</a></li>
<li><a href="http://bit.ly/1tthXBU" target="_blank">Heart of the City Farmer's Market</a></li>
<li><a href="http://www.sfcablecar.com/" target="_blank">Cable Car turnaround</a></li>
</ul>
</article>
Here's what I came up with:
function switchPix() {
document.getElementById("pix").innerHTML=(<img src="images/asian.jpg" width="480" height="270" alt="Picture of Asian Art Museum" />);
onMouseOver='switchPix'
added to the <figure id="pix" class="right">
I've tried other ways to try to reference the text of the links to switchpix when moused over, but to no avail.