troubleshooting Question

Onmousemove change image

Avatar of GarySB
GarySB asked on
HTMLJavaScriptWordPress
3 Comments1 Solution180 ViewsLast Modified:
I'd like to have three small pictures on the left and one larger picture to the right of them that changes when the mouse passes over one of the smaller ones.  I'm using this, but its not changing images for me.  Can you see what's wrong? or if its simpler just suggest new code please for Wordpress, Thank You

I tried:
changeImage('img src="https://www.mysite/picture2.jpg')"/> and
changeImage('src="https://www.mysite/picture2.jpg')"/> to see if that would help, it didn't.

<table>
<tr>
<td style="border-width: 3px;" width="5%">
<script type="text/javascript" language="javascript">
                function changeImage(img){
                   document.getElementById('bigImage').src=img;
                }
            </script>
            <div>
                <p><img src="https://www.mysite/picture1.jpg" alt="" width="60" onmouseover="changeImage('img src="https://www.mysite/picture1.jpg')"/></p>
                <p>
<img src="https://www.mysite/picture2.jpg" alt="" width="60" class="size-medium wp-image-2289" onmouseover="changeImage('img src="https://www.mysite/picture2.jpg')"/>
                <p>
<img src="https://www.mysite/picture3.jpg" alt="" width="60" onmouseover="changeImage('img src="https://www.mysite/picture3.jpg')"/>
                <p>&nbsp;</p>
                </br>
            </div>
</td>
<td style="border-width: 3px;" width="25%">
<img src="https://www.mysite/StartingLargePicture.jpg" alt="" id="bigImage" />
</td>
</tr>
</table>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros