PDA

View Full Version : help?



bellissima2005
10-05-2005, 03:42 PM
i'm quite a novice... can anyone help with how i could make a picture change when someone mouses over text on the page.
it's an effect like on this page:http://www.sunphotographics.com/albums.shtml
if you roll over one image (or text) another main image changes.

thanks for any help

Twey
10-05-2005, 05:14 PM
You can add a mouseover and mouseout to more or less any tag:

<img src="image1_1.png" name="switchimg"/>
<img src="image2_1.png" name="switchimg"/>
<img src="mouseoverme.png" onmouseover="document.images['switchimg'][0].src='image1_2.png';"/>
<!-- Image to mouse over -->
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed suscipit nulla sed est.
Nulla sit amet orci. Integer eleifend pulvinar est. Cras a lectus viverra purus dignissim
volutpat. Fusce ac ligula nec neque tempus iaculis.
<span onmouseover="document.images['switchimg'][1].src='image2_2.png';">Text to mouseover</span>
Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
egestas. Suspendisse magna. In in libero at sapien molestie tempus. Nam sapien dui,
vestibulum rutrum, posuere fermentum, feugiat eu, mauris. Donec ut quam. Suspendisse
posuere lacinia massa. Sed at arcu. Duis mattis.</p>