easycoder gave you code to change the width of the image you are mousing over... but i think you want to change the source (src) of some other image, not the width of the one being moused over.
Here is sample code that will do that (hovering over image one will change image2):
Title here
A few things to note:
- I added spaces so you can read the code. You should get rid of those spaces.
- The second image must contain an ID. this is how the javascript targets that image.
- the images don't need to be of the same size, but for better UED (User Experience Design), they should be. Otherwise, the page will jump.
- I added an "onmouseout" so you go back to the original image when you mouse off the image.
- The onmouseover can be in the image, or in a container around the image, like insite the
element.
I hope that helps.
2007-03-21 13:47:13
·
answer #1
·
answered by ★ Estelle ★ 6
·
0⤊
0⤋
give to that image a distinct id or name
something like this:
width=100
onmouseover
="document.img1.width=150;">
or
width=100
onmouseover
="this.width=150;">
2007-03-21 09:13:56
·
answer #2
·
answered by easycoder_biz 3
·
0⤊
0⤋
Undoubtedly a script that will do that: Try looking here:
www.dynamicdrive.com
2007-03-21 09:14:23
·
answer #3
·
answered by Cronides 5
·
0⤊
1⤋